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 813 posted 14 years ago by alishahnovin
Value converters allow ease of converting code-behind values to dependency property values
0 584 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 1469 posted 14 years ago by pckujawa
0 842 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 621 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 1103 posted 14 years ago by the_menace
0 1223 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 821 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 1084 posted 14 years ago by pckujawa
Requires TidyATL library for .NET - http://www.devx.com/dotnet/Article/20505/1763/page/2
0 1454 posted 14 years ago by tclancy
1 1146 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 754 posted 14 years ago by bryanlyman
Use it on your AreaRegistrationContext via the extension MapRouteLowercase
0 699 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 677 posted 14 years ago by bryanlyman
0 439 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 731 posted 14 years ago by ahawker
Tentative source shows conversion to/from microseconds.
0 886 posted 14 years ago by pckujawa
0 414 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 1094 posted 14 years ago by quangnd
0 606 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 1780 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 785 posted 14 years ago by blackf0rk
1 ... 9 10 11 12 13 ... 16