i have the following code,which im trying (for educational purposes only) convert an object type to int...this is the code:
class test
{
public test(object obj)
{
int tmp;
try
{
tmp=Int32.Parse(obj);;
x=tmp;
}
catch (System.Exception ex)
{
}
}
.
.
.
.
.
.
it doesnt work..tried also : int.prase(obj). and still didnt work...any idea?
class test
{
public test(object obj)
{
int tmp;
try
{
tmp=Int32.Parse(obj);;
x=tmp;
}
catch (System.Exception ex)
{
}
}
.
.
.
.
.
.
it doesnt work..tried also : int.prase(obj). and still didnt work...any idea?