Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to check if reader has multiple results
Message
 
 
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:
01579688
Message ID:
01579735
Views:
38
>Not directly relevant but wouldn't the above code skip the first result ?
>I haven't tried it but the docs state that, by default, the reader is positioned on the first result.

I only showed relevant part of the code. It starts from reading the first result normally and producing the formatted message.

Since there may be only ~2 or 3 cases in the whole application when we use more than 1 result, I decided to just go with the string concatenation in these cases. I think it's better than instantiate StringBuilder which would not be used in 99% of cases.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform