Welcome To Snipplr
Everyone's Recent C# Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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
963
posted 14 years ago by alishahnovin
Value converters allow ease of converting code-behind values to dependency property values
0
755
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
1691
posted 14 years ago by pckujawa
You can change your dynamic binding eval text with this method.
This method should be in same codebehind
0
810
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
1317
posted 14 years ago by the_menace
C#
Obfuscating .NET code so as to hide implementation details from public view (using BabelObfuscator)
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
1011
posted 14 years ago by pckujawa
C#
Get the network interface card (NIC) from a known MAC address (and get the IP addresses on that NIC)
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
1282
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
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
922
posted 14 years ago by bryanlyman
Use it on your AreaRegistrationContext via the extension MapRouteLowercase
0
872
posted 14 years ago by jmcd
C#
Generic list wrapper returns a smaller strongly typed sub-list which modifies the parent-list when changed (without events)
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
845
posted 14 years ago by bryanlyman
Snippet out of my C# KNN implementation.
Uses leave-one-out cross validation tuning with our given K to find our nearest neighbors.
0
903
posted 14 years ago by ahawker
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
1323
posted 14 years ago by quangnd
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
974
posted 14 years ago by blackf0rk