Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Occurs in C#
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Occurs in C#
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01566946
Message ID:
01566946
Views:
71
Hi everybody,

Just wondering if occurs should be implemented the same way as in SQL Server?

E.g.
string.Length - String.replace(stringToTest,"").Length
?

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.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform