T
Timothy V
string and int are two complety different types. Basically, casting only
works on two compatible (derived) types. A string and an int are no where
near the same. They may look it, but 1 is not "1" by any means. So in order
to 'convert' something to something (in this case, string to int),
Convert.ToInt32() must be invoked.
As far as i know, casting works best in the cases of inheritance and
polymorphism. I can explain your conversion problem more if you have
knowledge in those two areas.
Hope that helps,
Tim (new to C#, but proficient in C++).
works on two compatible (derived) types. A string and an int are no where
near the same. They may look it, but 1 is not "1" by any means. So in order
to 'convert' something to something (in this case, string to int),
Convert.ToInt32() must be invoked.
As far as i know, casting works best in the cases of inheritance and
polymorphism. I can explain your conversion problem more if you have
knowledge in those two areas.
Hope that helps,
Tim (new to C#, but proficient in C++).