Is there a place i could get C# util libs? I dont mean big libs or things like zlib. Something like a collection of helper functions like getting the most leftmost subdomain, fixing the /'s and \'s in a filename (i know its easy but still), writing the BOM for a textfile (maybe this exist but i dont know it), etc.
Asked
Active
Viewed 377 times
0
-
1The Encoding classes contain the byte sequences for a BOM. And perhaps even a helper method to write it into a stream. Check the `GetPreamble` function – CodesInChaos Mar 23 '11 at 08:40
-
[CodePlex](http://www.codeplex.com/), [CodeProject](http://www.codeproject.com/), [SourceForge](http://sourceforge.net/), [Google Project Hosting](http://code.google.com/hosting/) ect...? – digEmAll Mar 23 '11 at 08:42
-
@digEmAll: Those are for projects and libs. I am talking more of a collection. CodeInChaos: Found it and an alternative.`new StreamWriter(fn, true, Encoding.UTF8);` – Mar 23 '11 at 08:53
-
@acidzombie: Well, every site is basically a big collection of libs :P – digEmAll Mar 23 '11 at 08:56
-
about the filename, try 'System.IO.Path.Combine(...' or other method in this class – Leo Mar 23 '11 at 09:04
-
@Leo: alright i'll note it. I never actually had a problem with it, it was an example of the small things i want. The subdomain part is what i actually needed – Mar 23 '11 at 09:11
-
URI URL classes in the to get the Host portion, then String.Split... – sehe Mar 23 '11 at 10:31
1 Answers
1
Just for the "collection of helper functions", you might want to check this thread: What are your favorite extension methods for C#?
It's basically a collection of small utilities, that have also been collected in the ExtensionOverflow CodePlex project.
There are several interesting things there. I don't know about the things you are asking explicitly, but it's surely worth a look...

Community
- 1
- 1

Paolo Tedesco
- 55,237
- 33
- 144
- 193