Related questions
Convert any object to a byte[]
I am writing a prototype TCP connection and I am having some trouble homogenizing the data to be sent.
At the moment, I am sending nothing but strings, but in the future we want to be able to send any …
How to access property of anonymous type in C#?
I have this:
List<object> nodes = new List<object>();
nodes.Add(
new {
Checked = false,
depth = 1,
id = "div_" + d.Id
});
... and I'm wondering if I can then grab the "Checked" property of the anonymous object. I'm not …
How to do ToString for a possibly null object?
Is there a simple way of doing the following:
String s = myObj == null ? "" : myObj.ToString();
I know I can do the following, but I really consider it as a hack:
String s = "" + myObj;
It would be great if Convert.ToString() …