c# - Why does (string)int32 always throw: Cannot convert type 'int' to 'string' -


"post-text" itemprop = "text">

Why (string) int32 always throws: 'int' can not be converted to 'string'

  public Class Fu {Private Ent Fuide; Public Fu () {FooID = 4; String S = (string) FooID; // Throws Error String Sss = FooID.ToString (); // no compile error}}  

because no type of conversion is defined from intrad String This is what is the ToString method.


Comments