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 1336 posted 15 years ago by alishahnovin
Value converters allow ease of converting code-behind values to dependency property values
0 1181 posted 15 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 2300 posted 15 years ago by pckujawa
0 1507 posted 15 years ago by streamt
You can change your dynamic binding eval text with this method. This method should be in same codebehind
0 1170 posted 15 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 1791 posted 15 years ago by the_menace
0 2061 posted 15 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 1584 posted 15 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 2104 posted 15 years ago by pckujawa
Requires TidyATL library for .NET - http://www.devx.com/dotnet/Article/20505/1763/page/2
0 2116 posted 15 years ago by tclancy
1 2851 posted 15 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 1331 posted 15 years ago by bryanlyman
Use it on your AreaRegistrationContext via the extension MapRouteLowercase
0 1273 posted 15 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 1245 posted 15 years ago by bryanlyman
0 907 posted 15 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 1296 posted 15 years ago by ahawker
Tentative source shows conversion to/from microseconds.
0 1650 posted 15 years ago by pckujawa
0 784 posted 15 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 1851 posted 15 years ago by quangnd
0 1114 posted 15 years ago by Anthony
Reads the EXIF Data to find the actual original taken date. This is available on most camera's.
1 2748 posted 15 years ago by derekholmes
1 1388 posted 15 years ago by blackf0rk
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 1456 posted 15 years ago by blackf0rk
1 ... 9 10 11 12 13 ... 16