Link to home
Start Free TrialLog in
Avatar of deleyd
deleydFlag for United States of America

asked on

need C++ syntax, data table tertiary "if null use default value"

I need the syntax for changing the last line to a tertiary "if" that checks if the data is null, uses a default value if the data is null (say 0), otherwise uses the data value.
using System.Data;
...
        public FacilityData(DataRow DRow)
        {
            SiteID = (int)DRow["SiteID"];

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Beartlaoi
Beartlaoi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial