Reputation: 17
Explain with Example if possible.... For example
int s=System.Convert.ToInt64(txtno.Text);
int k=Convert.ToInt64(txtno.Text);
Upvotes: 1
Views: 214
Reputation: 12816
They are exactly the same, a using directive (using System) makes leaving off the System qualifier possible.
Upvotes: 1
Reputation: 81
None. Its the same. (if you not define a Convert class in your namespace).
Upvotes: 0
Reputation: 30872
They are the same.
On top of the file you have the line
using System;
That means that when you use types and classes defined in the System namespace, you do not need to specify "System" explicitly.
Thus, System.Convert
and Convert
refer to exactly the same thing, the latter is just shorter to write.
Upvotes: 2