Welcome To Snipplr


Everyone's Recent C# Snippets



1 ... 9 10 11 12 13 ... 16
I've been trying to figure out a way to make ComboBox items selectable by the keyboard, much like how any ComboBox, ListBox, Selection box is in any other language like HTML, Windows Forms, etc. Most of the solutions I've seen online weren't parti...
0 960 posted 14 years ago by alishahnovin
Value converters allow ease of converting code-behind values to dependency property values
0 751 posted 14 years ago by davidsi
Read the [best article on the subject - Exploring Secrets of Persistent Application Settings](http://www.devx.com/dotnet/Article/33944/1954) - and then the following links if desired. (Note, I recommend reading [this forum post about settings not bei...
0 1686 posted 14 years ago by pckujawa
0 1011 posted 14 years ago by streamt
You can change your dynamic binding eval text with this method. This method should be in same codebehind
0 806 posted 14 years ago by emregulcan
Loop through the ListView Control within 2nd level collection. 2nd level means it's within another control (ie table html generic control).
0 1312 posted 14 years ago by the_menace
0 1470 posted 14 years ago by jmcd
If you weren't already aware, you can use a product like [Reflector.NET](http://www.red-gate.com/products/reflector/) to see all of the source code (that's right, the code) of a .NET assembly (DLL, EXE, etc). This is a real problem when your code is...
1 1010 posted 14 years ago by pckujawa
The code shows how to take a known MAC (e.g. "00:00:00:11:22:33") and locate the NIC which has that MAC. Note that the built-in MAC class for .NET is called PhysicalAddress (in System.Net.NetworkInformation). PhysicalAddress.Parse can take a string,...
0 1280 posted 14 years ago by pckujawa
Requires TidyATL library for .NET - http://www.devx.com/dotnet/Article/20505/1763/page/2
0 1668 posted 14 years ago by tclancy
1 1371 posted 14 years ago by ajit555
You must include these DLL references in your vsweb or vscode project:\r\nPresentationCore,\r\nPresentationFramework,\r\nWindowsBase. \r\nNotice how I am manipulating the RGB values of each pixel, this is the power of these classes. The Drawing class...
0 918 posted 14 years ago by bryanlyman
Use it on your AreaRegistrationContext via the extension MapRouteLowercase
0 871 posted 14 years ago by jmcd
A class which wraps a parent list containing mixed object types, to provide smaller strongly typed sub-lists of objects. These sub-lists can be modified, which then modifies the parent list concurrently (without events being triggered). Supports the...
0 844 posted 14 years ago by bryanlyman
0 589 posted 14 years ago by streamt
Snippet out of my C# KNN implementation. Uses leave-one-out cross validation tuning with our given K to find our nearest neighbors.
0 898 posted 14 years ago by ahawker
Tentative source shows conversion to/from microseconds.
0 1039 posted 14 years ago by pckujawa
0 515 posted 14 years ago by fredblogs
Another common task when working with strings is to replace a set of characters with a set of escape sequences. Sometimes the replacement is very easy - you only have to place a backslash (or another character) before every occurrence of an escaped c...
0 1322 posted 14 years ago by quangnd
0 768 posted 14 years ago by Anthony
Reads the EXIF Data to find the actual original taken date. This is available on most camera's.
1 2036 posted 14 years ago by derekholmes
An important thing to keep in mind about adding groups is that you add groups to site collections and not webs. To do this, we access the SiteGroups collection rather than the Groups collection. In order to assign permissions, each group you add n...
0 973 posted 14 years ago by blackf0rk
1 ... 9 10 11 12 13 ... 16