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
Outlook won't open .pptx attachment directly
Enteprise Application Documentation Application
Exchange 2007 mail relay
Replace Line breaks with spaces using VB in Excel
Checkpoint VPN Site to Site Issue - encryption failure: Unknown SPI: 0xb41565ee for IPsec packet.
Adding one cell to the bottom of a named range defined byan OFFSET
Set site as read only to everyone
MAC Mail with Exchange 2007 Attachment Issue
Error message when replying, sending, openning email in OWA
exiting users from database