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
Server 2008 R2 DC File Permissions
Install SQL reporting services 2005 and 2008 on the same server
Setting Folder Permission in Windows XP - VB Script
CKEditor: How to update textarea using javascript?
Insert Script from the command prompt
Private WAN
Mac OS X 10.6.3 Can't logon to Active directory
added a function to webservice. Why can't i see it by intellesense on the client
How to undelete public folder content on MS Exchange Server 2000
WatchGuard XTM Web UI