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
Delphi Email Blaster - possibly using Report Builder and PsRBExportDevices
Users resolution keeps reverting back to 800x600
Comparing columns in a table
How do I know if my laptop has a spyware?
FTP - without log in
loop an array in an array and insert into db
IF - Then script based on file date?
How to access class due to 'cannot instantiate abstract class' error
How to activate the insertitemtemplate of a formview
How to find and replace specific string with blank using sed or any better cmd?