object?
-
In .NET everything is derived from an object - so you can just cast it.
object o = (object) param;
Or is that not what you wanted?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones
-
In .NET everything is derived from an object - so you can just cast it.
object o = (object) param;
Or is that not what you wanted?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones
-
your not by any chance trying to work with automation of some type are you? I remember doing Word automation where they want object as params in functions and you have to set them as object instances outside of the function as they need referencing.
Life goes very fast. Tomorrow, today is already yesterday.
-
your not by any chance trying to work with automation of some type are you? I remember doing Word automation where they want object as params in functions and you have to set them as object instances outside of the function as they need referencing.
Life goes very fast. Tomorrow, today is already yesterday.
Variant, I know he wants a variant, I can't beleive linq has brought back the variant (var) X|
Never underestimate the power of human stupidity RAH
-
I don't even think you need to cast it
Life goes very fast. Tomorrow, today is already yesterday.
You are right, you can use the implicit cast, but I don't think that is the question he meant to ask. Hopefully, by answering the question he did ask too explicitly, it will prompt him to ask the question in better english... (Did that make sense?)
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones
-
You are right, you can use the implicit cast, but I don't think that is the question he meant to ask. Hopefully, by answering the question he did ask too explicitly, it will prompt him to ask the question in better english... (Did that make sense?)
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones
-
Variant, I know he wants a variant, I can't beleive linq has brought back the variant (var) X|
Never underestimate the power of human stupidity RAH
It hasn't. Although that's what I first thought when I came across var. :) When you do
var x = from...
, x is strongly typed (you may not know what its type is, but, whatever it is, you can't assign something of a different type to it unlike variants.)Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis
-
Wouldn't the MSDN or related definition for Boxing help out? http://www.csharphelp.com/archives/archive100.html[^]
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
The woods are lovely, dark and deep, But I have promises to keep, And miles to go before I sleep, And miles to go before I sleep!