9
Answers

Override procedure..

ca guy

ca guy

16y
4k
1
Hi..
    I am new to c#. I want to write common procedure , when I pass database field as a parameter to procedure, if field has value just return the value or if field type is numeric then reurn 0 or if it is string then return ""..depending upon datatype of field being passed.
   Something like this considering CheckNull is the name of procedure..
     txtCode.Text=CheckNull(rs.Fields["ID"]);
     txtDate.Text=CheckNull(rs.Fields["SaleDate"]);
     txtYear.Text=CheckNull(rs.Fields["NoofYears"]);
Answers (9)