How to convert automatically system genrated string to int in c# code.

How to convert automatically system genrated string to int in c# code.

Im not sure what do you mean?
If you have a number, you can do in many ways:

string yourString ="...."; //some value, you said its a number
int myInt = 0;
if(int.TryParse(yourString, out myInt)
{
    //here you can use your string converted into real number (type of integer)
}
else
    Console.WriteLine("This is not a number");

//or you can use:
int.Parse("your value");
or:
Convert.ToInt32("your value");

Hope it help,s if not provide us some better description of this issue of yours.
bye

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.