how to Replace null value with 0 Using C#
how to Replace null value with 0 Using C#
//here we suppose that objDataTable have data collection as table now access this //datatable object.
decimal j = 0;
j = objDataTable.Rows[0]["Qty"] == DBNull.Value ? 0 : Convert.ToDecimal(objDataTable.Rows[0]["Qty"]);
NOTE :-
//if DBNull.value is null then "0 " else "your code here")
// ? = then
// : = else
Thank You
[Sumit Singh Shekhawat]
How To Replace Null Value With 0 Using C >>>>> Download Now
ReplyDelete>>>>> Download Full
How To Replace Null Value With 0 Using C >>>>> Download LINK
>>>>> Download Now
How To Replace Null Value With 0 Using C >>>>> Download Full
>>>>> Download LINK