Dataset/datatable is a value type or reference type
-
28-02-2021 - |
Question
Is datatable/dataset is value type of reference type?
But the most important question in my mind is- "how to find whether a type is a value type or reference type?"
OTHER TIPS
You can use the Type.IsValueType method.
Both are reference type
DataTable dt = new DataTable();
Type t = dt.GetType();
bool isValueType = t.IsValueType;
isValueType will return false
.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow