Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EVL analogue in C#
Message
From
09/07/2013 16:17:14
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01578022
Message ID:
01578024
Views:
50
>Hi everybody,
>
>Quite often I am getting an exception about Invalid format. Say, I just got one here
>
>
>Byte instr_type = Convert.ToByte(GetParameterValue(rowValues, "instr_type"));
>
>The value is returned as empty string and apparently ToByte and other conversions can not deal with empty string. So, EVL function may be helpful here.
>
>Is there any way to write this expression to not get exception without doing this with extra variable first?
>
>Thanks in advance.

Would Byte.TryParse work for you?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform