Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Occurs in C#
Message
From
26/02/2013 13:05:53
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01566946
Message ID:
01566948
Views:
51
>Hi everybody,
>
>Just wondering if occurs should be implemented the same way as in SQL Server?
>
>E.g.
>
>string.Length - String.replace(stringToTest,"").Length
>


What's wrong with String.Contains() ? Why do you need a replace()



>
>Thanks in advance.
>
>Found this implementation also
>
>http://www.dotnetperls.com/string-occurrence
>
>wondering if I should go with my first idea or this one.
>
>Found this discussion
>
>http://stackoverflow.com/questions/541954/how-would-you-count-occurences-of-a-string-within-a-string-c
>
>I think I may need two separate methods - one for string and one for char.
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform