Microsoft
Software
Hardware
Network
Question : Fastest way to count how much , I have in string variable with C#
Hi experts!
I’m developing application WinForm on NETFramework 2 with C#. I have a string valuable which can be:
S=”234”;
S=”234,456,456”;
I need to find faster way to count how much are , in this string. It should be as fast as possible as this action is in loop. Please help.
Answer : Fastest way to count how much , I have in string variable with C#
int i = 0;
if(s.Contains(","))
{
int i = string.Split(",").Length - 1;
}
Random Solutions
Cast Question for Crystal Reports
video driver needed
JSON Value Retrieve
Display Query Results in a Message Box
asp.net page to test database connectivity
How to remove automatic login from Outlook 2010
PfSense Captive Portal / VmWare HELP
Run procedure every min (application_Start) ?
Printing to printer over a WAN Link
Slipstream all updates into new wim.image / win 7 install DVD