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
What is the Best Digital Camera, that is tiny, takes video and takes great pictures?
How to copy a 150 Gb database across the country?
How to configure two types of update timings for VSE 8.7i via EPO server?
Problem Installing Windows Server 2003 Enterprise Edition on Dell Precision 390
csico catalyst3500
Move users home folders to new storage partition
HP Plotter will not plot inked area only
task manager high CPU usage widows server 2003
Can't access variable in code behind page
Outlook/Exchange Issue with Emails not showing