c# - Why can't I use format specifier on DataGrid Value? -
string foo = selectedrow.cells["foo"].value.tostring("d5"); gives me error of
no overload method 'tostring' takes 1 arguments so had use
string foo = selectedrow.cells["foo"].value.tostring().padleft(5,'0'); anyone can explain why?
datagridviewcell.value of type system.object. object.tostring() method not take arguments. therefore, cannot provide format specifier.
Comments
Post a Comment