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
Cross-forest trust: The domain controllers required to find the selected objects in the following domains are not available
RHCE Exam
View Composer agent initialization state error (2): Failed to redirect profiles directory (waited 0 seconds)
mstsc rdpfile published on citrix
Application level firewall
Restoring files of users on SBS 2008
Calculating linear regression by Java code as done in Microsoft Excel
sql server smtp port
I need to stop, then re-start, a thread in a web service using IIS
Finding file owner - getting an error: identity references could not be translated