Welcome To Snipplr
Everyone's Recent C# Snippets Tagged Net
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
I removed several properties from my custom Profile class, and wanted to clean out the data from the aspnet\_Profile table. This code will remove all unwanted data from the PropertyNames and PropertyValuesString columns of aspnet\_Profile. Note this...
2
825
posted 13 years ago by mmfusion
.net 2.0+ Generic classes make code size much smaller and casting objects (boxing) a cinch. However, currently there are some unsupported IDE options when trying to cast objects to and from generic objects that use mixed object types (inherited from...
0
740
posted 14 years ago by bryanlyman
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
1473
posted 14 years ago by pckujawa
Requires TidyATL library for .NET - http://www.devx.com/dotnet/Article/20505/1763/page/2
0
1464
posted 14 years ago by tclancy
Snippet out of my C# KNN implementation.
Uses leave-one-out cross validation tuning with our given K to find our nearest neighbors.
0
735
posted 14 years ago by ahawker
This class uses static methods to create html controls on the fly in .NET
2
767
posted 14 years ago by mpcircuitry
Great way to show the user that something is happening without too much tedious work. As simple to use as putting the following code in Form_Load:
AutoWaitCursor.Cursor = Cursors.WaitCursor;
AutoWaitCursor.Delay = new TimeSpan(0, 0, 0, 0, 25);...
1
1550
posted 14 years ago by pckujawa
To display "&" character within the string used as error descriptor in ErrorProvidor component in .NET use "&&&" so that it displays as a single "&".
More detail at:
http://www.codeproject.com/Messages/3225091/ErrorProvider-SetError-string-constra...
0
870
posted 14 years ago by sysdeamon
Since an asynchronous method is usually one you call and then it invokes a callback when it is finished, it is not obvious how to test such a method in a definite manner. In the method described at the above URL, the author uses .NET's System.Threadi...
1
939
posted 14 years ago by pckujawa
Essentially, you need to tell Visual Studio to generate an XML file with documentation, then use a separate tool to create a help file (usually .chm) out of that XML file. The tool to use is MS's Sandcastle. You'll also want a GUI for Sandcastle, whi...
0
834
posted 14 years ago by pckujawa
Specifically, this code enables you to pass a string from C# into C++ managed code and then get a C++ pointer to the string's chars.
[Marshal.StringToHGlobalAnsi Method](http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marsha...
0
2040
posted 15 years ago by pckujawa
In Ruby you can write 5.times { print "Hello World" } . With a simple extension method I was able to do something similar with C#.
0
492
posted 16 years ago by Soft
Very important to set the RefCursor Type. Otherwise you get the PLS-00306 Error 'Wrong Number or types of arguments'
0
758
posted 17 years ago by rengber