Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How to create null byte?
This is what I do
byte? nb = null; methodCall (rdr.IsDBNull(15) ? nb : rdr.GetByte(15));
This does not even complile. What is the proper syntax?
methodCall (rdr.IsDBNull(15) ? (null)byte : rdr.GetByte(15));
Try:
(byte?)null : rdr.GetByte(...)