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
how to export the SSL certificate from Microsoft exchange 2003 in the .p12 format for mobile phone HTC Desire
Shares unavailable
moth balls around the home
Internal Server Error
move a VB.Net exe file
Validation of viewstate MAC failed? How I fix it?
Script to enable folder auditing
cgi procress page
Weirder than usual HP desktop problem – power supply - motherboard?
Can you tell what Server a Backup Exec agent was pashed out from