Welcome To Snipplr


Everyone's Recent Snippets Tagged c#



VS.NET Macro to list all projects in current solution that have TreatWarningsAsErrors=false.
0 3402 posted 14 years ago by slolife
Just call "ProcessImageAndItsThumbnail" with your newly uploaded image's URL, and it will resize it for you, and make a thumbnail as well. Just remember to set the sizes you want for these new images.
1 2058 posted 14 years ago by Krummelz
Converting BitmapSource to Bitmap in C#
0 6721 posted 14 years ago by caringprogrammer
Sample code to read tiff in C# and cropp it
1 4226 posted 14 years ago by caringprogrammer
Properties that can be set are found here: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cde669f1-5714-4159-af95-f334251c8cbd.mspx?mfr=true
0 1507 posted 14 years ago by jsturtevant
Overwrite LoadViewSate and SaveViewState page methods. SaveViewState is called on initial page load and that is the place to save your negated flag to Session. This value should be compared in LoadViewState and if the values are the same it means...
0 1477 posted 14 years ago by Neven
1 2903 posted 14 years ago by Krummelz
1 1630 posted 14 years ago by jimfred
ASCIIEncoding class has another method, GetByte(), which does the opposite of this one.
1 1945 posted 14 years ago by roboninjapiratejesus
this thing is a pain to configure
0 1583 posted 14 years ago by amos24c
0 1474 posted 14 years ago by amos24c
0 1288 posted 14 years ago by BrentS
0 1541 posted 14 years ago by BrentS
0 1491 posted 14 years ago by wedgardigitalwkscom
1 1223 posted 15 years ago by stuartleitch
Sets the keep-alive interval for the socket.
0 2411 posted 15 years ago by aelesbao
Ever wanted a method that can truncate a string, but only on a word boundary? This method works like Substring() but doesn't snip a string in the middle of a word, i.e. it only truncates the string on a word boundary. Useful for producing a summary f...
1 3107 posted 15 years ago by stewartrae
my take on fizzbuzz written in C#.Net - Razor
0 1393 posted 15 years ago by rwczippy
Snip it if you keep forgetting how its done.
1 1826 posted 15 years ago by fengelz
Not that theres anything new to this. In fact its very old fashioned, but If you like me forget how its done; snip it.
0 1698 posted 15 years ago by fengelz
use this if you want to make a binary use an older version of a dependent binery
1 1368 posted 15 years ago by samwa
The only way i know to create a normal "fire property changed" method that is still efficient yet strongly typed. The other common pattern uses run time checking and uses the TyepDescriptor for the current type to check for property existence - a muc...
0 1104 posted 15 years ago by nimast
0 1204 posted 15 years ago by tonatiuh
0 1417 posted 15 years ago by tonatiuh
0 1587 posted 15 years ago by dmertl
Useful for detecting when a string is <b>really</b> empty.
0 2676 posted 15 years ago by dotNetkow
I use these helper methods to create a jQuery based date text box with appropriate short date formatting.
0 1401 posted 15 years ago by nkirkes