M
MC
Let's say I want to validate something with TryParse but I don't need
to convert it. In C#, it seems I must provide that out parameter
regardless. In VB, I can pass Nothing. I'd like to be able to do the
same in C# instead of having to declare a "dummy" variable for the out
parameter. In other words, can I do something like this:
if( int.TryParse( str, null ) )
{
// Do something.
}
Thanks,
Craig
to convert it. In C#, it seems I must provide that out parameter
regardless. In VB, I can pass Nothing. I'd like to be able to do the
same in C# instead of having to declare a "dummy" variable for the out
parameter. In other words, can I do something like this:
if( int.TryParse( str, null ) )
{
// Do something.
}
Thanks,
Craig