Reputation: 45096
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));
Upvotes: 0
Views: 89