Welcome To Snipplr


Everyone's Recent C# Snippets



1 2 3 4 5 6 ... 16
Output your errors to the Windows event log. Very effective to output from try catch blocks.
2 1885 posted 13 years ago by Verician
I needed to open a browser window from my small C# app as a result of a dynamic URL build from data received from the command line. This did the trick!
1 3305 posted 13 years ago by Verician
This code allows quick access to the dnn state/region listings..
0 1594 posted 13 years ago by box86rowh
Just a quick down and dirty login function I use.
0 1680 posted 13 years ago by box86rowh
Lambda expression to convert an array.
0 2071 posted 13 years ago by rengber
Simple touch detection in unity for mob devices
0 2782 posted 13 years ago by jquery404
How to get users identity and principal in C#
0 1679 posted 13 years ago by toLL
Helps write data to the console screen.
1 1413 posted 13 years ago by lookitstony
Access a Method in a Master Page with Code-Behind
0 1791 posted 13 years ago by kfiil
0 1161 posted 13 years ago by stirfryrose
Quick method to validate a string is a valid IP address.
1 2900 posted 13 years ago by stephenmurby
A small snippet to parse out proxies from http://hidemyass.com/proxy-list/
0 2622 posted 13 years ago by icinNet
Dropdown list bound in MVC using Entity Framework
0 1608 posted 13 years ago by praveensewak
author SomeMiscGuy@StackOverflow
1 2901 posted 13 years ago by witmann
How do I prevent previously submitted form data from being reinserted into the database when the user presses the browser's Refresh button? Although it is not possible due to unique key constraint available in tables but it is unnecessary go to othe...
0 1534 posted 13 years ago by satie83
Snippet to illustrate the three actions that happen in all LINQ query operations.
0 1842 posted 14 years ago by denakitan
A simple utility method to validate an Inputted Email Address.
0 2491 posted 14 years ago by ryanfiorini
This snippet pulls down an image from a URL into a byte(). From there you can re-size or save. Don't forget the necessary try - catch.
0 7606 posted 14 years ago by ryanfiorini
This snippet shows how to create indexed color bitmap in C#. The code also shows how to access and modify pixel data using LockBits.
0 2962 posted 14 years ago by putu
This method shuffles an array. This is the optimum implementation for such an algorithm - O(n).
0 1557 posted 14 years ago by fixpq
Se pide 3 numeros al usuario y luego se pregunta si lo quiere en orden ascendente o descendente.
0 3809 posted 14 years ago by Chaqui
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 1985 posted 14 years ago by Krummelz
Mostrare una tile dall'isolated storage con Windows Phone 7.1
0 2547 posted 14 years ago by kajinka13
Converting BitmapSource to Bitmap in C#
0 6614 posted 14 years ago by caringprogrammer
Sample code to read tiff in C# and cropp it
1 4139 posted 14 years ago by caringprogrammer
Again, A-B-C. All the Behaviour garbage that "Add Service Reference" inserts for the TCP binding is unnecessary, especially if the Operation Contract is only for simple value types.
0 2745 posted 14 years ago by rengber
ABC - Address Binding Contract Note that the Service Name and Contract must match a real live type (case Sensitive) Binding name is also case sensitive.
0 2757 posted 14 years ago by rengber
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 1448 posted 14 years ago by jsturtevant
This code demonstrates how to concatenate list of strings using lambda expression without need to use a loop.
1 1784 posted 14 years ago by Neven
Create stored procedured in your database to handle users. Membership and Rulemanager. Type the line below in a commandprompt where "xxx.xx.xx.x" is IP to server and "mr" stands form membership and rulemanager.
0 1592 posted 14 years ago by Barlon
1 2 3 4 5 6 ... 16