Welcome To Snipplr


Everyone's Recent C# Snippets



I have not tested it yet but the author claims to make your printer show some random messages.
0 1281 posted 17 years ago by planetcall
0 1001 posted 17 years ago by tranvinhnt
0 1169 posted 17 years ago by udayrayala
Replace invalid to valid file name by using RegEx
0 1367 posted 17 years ago by tranvinhnt
1 1379 posted 17 years ago by jags_sonawane
This is a code example which demonstrates how to send Email with attachment using your GMAIL Account.
6 2031 posted 17 years ago by planetcall
In Ruby you can write 5.times { print "Hello World" } . With a simple extension method I was able to do something similar with C#.
0 1069 posted 17 years ago by Soft
0 1213 posted 17 years ago by rengber
Pretty intuitive, might be an easier/simpler way.
0 1461 posted 17 years ago by rengber
Stupidly simple, but I keep forgetting it.
0 1554 posted 17 years ago by rengber
Typically won't work if the ASP.Net service identity (in the machine.config ProcessModel section) is a local account.
1 2151 posted 17 years ago by rengber
There may be a simpler way to do this but this is the only way I could find to solve this problem. There is no Add method for basic arrays.
2 1516 posted 17 years ago by ecavazos
This is very useful if you need to populate a dropdown.
1 3171 posted 17 years ago by ecavazos
This can be useful for string preparations.
1 1396 posted 17 years ago by ecavazos
Everything is either true or untrue, or both true and untrue, or neither true nor untrue - nagarguna
2 2002 posted 17 years ago by zvasanth
drunkenprogrammer
0 1628 posted 17 years ago by zvasanth
drunkenprogrammer
0 1423 posted 17 years ago by zvasanth
drunkenprogrammer
0 3308 posted 17 years ago by zvasanth
Everything is either true or untrue, or both true and untrue, or neither true nor untrue
0 3572 posted 17 years ago by zvasanth
work from content pages or submaster pages
0 1815 posted 18 years ago by cori
You could eliminate the ListDictionary if you created a simple method to map C# types to DbTypes. Although this method also lets you skip over some object properties my using the ListDictionary to contain a subset of properties. It could also be us...
0 1588 posted 18 years ago by rengber
0 1108 posted 18 years ago by lfbarbieri
1 1990 posted 18 years ago by gndprx
1 1518 posted 18 years ago by rengber
0 1381 posted 18 years ago by gndprx