Click here to Skip to main content
15,891,762 members
Everything / Programming Languages / C# 2.0

C# 2.0

C#2.0

Great Reads

by Jeffrey Walton
Import and export Cryptographic Keys in PKCS#8 and X.509 formats, using Crypto++, C#, and Java.
by Dark Daskin
Article describes how to build an assembly that exposes functions to unmanaged code without C++/CLI
by Waleed Elkot
Reading text from any image using Microsoft Office 2007 OCR
by Josh Smith
Reviews a pattern which enables new possibilities for data binding.

Latest Articles

by Shivprasad koirala
Design Pattern FAQ - Interview Questions (Quick Reference)
by Claudio Nicora
An extended NumericUpDown control with better focus and mouse wheel management.
by Toby Patke
Clearcove.Logging is a very simple logging library designed to meet most logging needs with straight-forward licensing terms.
by Alexander Iacobciuc
In this article you will find an implementation of a stream player control.

All Articles

Sort by Updated

C# 2.0 

9 May 2013 by Abhay@Accenture
10 Sep 2009 by Abhishek Sur
It is to be noted, .NET has lately introducedResponse.RedirectParmanent() after a long await. The main motive of this is tohave permanent response redirection to the Search Engines.Response.RedirectParmanent() is an extension function introduced in .NET 4.0.Themain motive of it is to indicate
27 Apr 2011 by Abhishek Sur
Thread.Sleep is actually used to block the thread Temporarily for an interval. Async CTP brings forth one probable alternative if you dont want to write yourself : TaskEx.Delay(milliseconds)Probably in next release it will be Task.Delay(milliseconds)This works little different as it...
20 Jun 2011 by adolfobarallobre
Here is code for an alternate:public class OfficeButton : Button{ public OfficeButton() : base() { } private Color mGradientGlowColorColor; // the Color field public Color GradientGlowColor // the Color property { get { return...
25 Feb 2013 by ajaynarewade
This is helper class to post serialized objects (Data) to other page in asp.net.
28 May 2013 by akramKamal
Code to serialize/deserialize any object to an XML file.
17 Feb 2010 by Alan N
Handling the Popup event raised by the System.Windows.Forms.ToolTip component would seem offer an ideal opportunity to alter the tooltip text to reflect an underlying change. Unfortunately the stack overflow caused by calling ToolTip.SetToolTip will soon put a stop to the attempt.The test...
31 Jan 2013 by Anand Gunasekaran
Listview Paging Feature to split the records of the listview in sevaral pages.
25 Feb 2012 by Andreas Gieriet
To not having spoiled the client code with #if DEBUG, you might use the following:[STAThread]static void Main(){ Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { Debugging.DebugSetupConsole(); ...
5 Jun 2012 by Andreas Gieriet
This is an alternative for "Sorting Strings based on the position of the block letter"
31 Aug 2012 by Andrew Rissing
A function to generate an endless collection of scrolling text for your use/amusement.
18 Feb 2010 by Ank_ush
How to change the background color for an MDI parent form in Visual C#This article demonstrates how to programmatically change the background color for a multiple-document interface (MDI) parent form by using Visual C#.When you use a Windows Form as an MDI parent form, the Application...
10 Jun 2010 by Anshul R
The Perfect Translation/Conversion of Code
27 May 2011 by Anshul R
Dim value As Boolean = My.Computer.Network.IsAvailable can be used in a situation where the only network a system will be connected to is the Internet.Dim value As Boolean = My.Computer.Network.Ping(hostNameOrAddress ,timeout) hostNameOrAddress can be any valid website -...
21 Sep 2011 by Anshul R
Private Sub GetIPAddress()Dim strHostName As StringDim strIPAddress As StringstrHostName = System.Net.Dns.GetHostName()strIPAddress = System.Net.Dns.Resolve(strHostName).AddressList(0).ToString()MessageBox.Show("Host Name: " & strHostName & "; IP Address: " &...
14 Oct 2012 by AnuragTripathi
Convertor for Unicode to Krutidev and vice-versa.
20 Sep 2012 by Anuraj Parameswaran
Delete a file or folder to Recyclebin using C#
12 Mar 2014 by apis3445
With C# and the Windows API, you can execute a program in a second monitor.
20 Sep 2011 by Archimedes24
I find this useful:Dim st As System.IO.StreamDim sr As System.IO.StreamReaderDim req As System.Net.WebRequest = System.Net.WebRequest.Create("http://www.whatismyip.com/automation/n09230945.asp")Dim resp As System.Net.WebResponse = req.GetResponsest = resp.GetResponseStreamsr =...
17 Aug 2012 by Arman Aşçı
Parallel port data register control with C# .NET 2.0 and inpout32.dll.
20 Nov 2012 by Arno1973
A fix for ImageButtons problem in IE10 when project is not 4.5
17 Dec 2012 by AshishChaudha
This article describes the working of fileupload inside an updatepanel and showing the file upload progress to the user.
17 Dec 2012 by AshishChaudha
This tip describes the working of DetailsView for inserting a new record, updating and deleting the existing details of the user.
17 Dec 2012 by AshishChaudha
This tip describes how to export data to an Excel file from a GridView.
27 Jan 2013 by AshishChaudha
This tip talks about creating an auto complete textbox using jQuery.
23 Mar 2010 by AspDotNetDev
This version works regardless of parameters:public void AnyMethod(int parameter){ MethodInvoker wrapper = new MethodInvoker(delegate() { // Do your thing here! }); if (this.InvokeRequired) this.Invoke(wrapper); else wrapper();}Note also...
14 May 2014 by atlaste
How to fix hiding controls in the Visual Studio user control designer
16 Jul 2013 by Atulkumar P Patel
Anti Patterns are wrong practice followed by Developers. They are opposite to Design Patterns.
30 Apr 2013 by Aydin Homay
In the tip, I want to illustrate how to host windows form in windows user control
19 Oct 2010 by Behzad Talebpour
Alternatively, you can erase your closing bracket (}) and VS will format the whole block (between opening & closing bracket). This works only if there is no syntax error in that block.
14 Feb 2014 by BenScharbach
How-To Convert a String Collection to a Multi-Enum item using TryParse
20 Nov 2011 by Bernhard Hiller
That's far too obscure.All you need to do is store a reference to the TabPage instance which was removed from the TabPages collection of the TabControl. You may use the form where the TabControl is placed for that purpose.You could also create your own TabControl which has an extra property...
7 Nov 2012 by Bhasker Kandpal
Exploring the behaviour and capabilities of a property grid control.
29 Mar 2011 by Brijesh Kr
8 Apr 2011 by Brijesh Kr
How to disable Autorun C#
13 Nov 2013 by BrokenEvent
Simple and fast .NET XML parser without using System.Xml
1 Aug 2014 by Bryan Lyman
A method for duplicating a web page (including all scripts and styles) to run as if it originated from your own server, then modify server-side and client-side functionality afterwards.
1 Jun 2012 by CoperNick
How suprising can be conversion of decimals to bytes in C#
13 Jun 2011 by Ctznkane
The Array class already contains this capability with no casting required. The IndexOf method is a static one that returns the index of the value and a -1 if it doesn't exist.Here is an example:exists = Array.IndexOf(arr, "item") >= 0
6 Mar 2015 by Darkencrow
A multi-drawer style collapsable UI container
13 Jan 2011 by DaveyM69
How to prevent a CD/DVD drive from being opened.
22 May 2010 by DaveyM69
Enables access to the original argument in all events
22 May 2010 by DaveyM69
Now your application can update it's saved data regrdless of the account it is running under.
22 Mar 2011 by DaveyM69
Starting a thread using a generic argument
21 Aug 2010 by DaveyM69
How to access a control from a different thread + good alternatives by other members!
7 Feb 2012 by DaveyM69
How to have a real console window as well as your forms
3 Sep 2010 by DaveyM69
A few quick examples of how to correctly create events.
6 Sep 2010 by DaveyM69
How to convert a generic List of derived types to a generic list of base types.
22 Aug 2015 by Deepak Kr Choudhary
This article is about the session use in ASP.NET.
18 Nov 2011 by Denno.Secqtinstien
protected void Page_Load(object sender, EventArgs e){ HttpBrowserCapabilities bc = Request.Browser; Label1.Text = "IP Address=" + Request.UserHostAddress;}
12 Dec 2011 by Denno.Secqtinstien
Code that measures a time interval as you would measure the execution time of a task
23 Sep 2015 by dibley1973
Call stored procedures in a type safe way using my StoredProcedureFramework for .NET
13 Oct 2014 by Ed Gadziemski
How to set a null binary value (zero-length binary value) in the registry from your C# program.
12 Jul 2012 by ednrg
This is a .NET port of a VBScript utility
18 Aug 2014 by Emiliarge
Read and write data to Access databases without limitations caused by the use of the SQL.
30 Aug 2014 by Emiliarge
2 ways to read and write data to *.xls and *.xls files and display it on DataGridView.
31 May 2014 by Evgeny Pereguda
This is simple implementation of fast forward 1D DCT-II on MSIL which is generated at runtime.
25 Jan 2012 by fastal
VB version:Friend Declare Function AllocConsole Lib "kernel32.dll" () As BooleanFriend Declare Function FreeConsole Lib "kernel32.dll" () As BooleanSub main() Dim MainForm As New frmMain If Command = "" Then MsgBox1 = AddressOf MyMsgBox1 ' messagebox delegate sub call...
25 Dec 2011 by Gandhi Ashish
Checking Internet Is Connected Or Not From .NET
18 Sep 2014 by Gautham Prabhu K
Creating and using Service Locator pattern
17 Apr 2014 by gunjan k saxena
This tip will help to create an action filter to compress the contents like Json, partial view, etc.
23 Jul 2012 by hari19113
This code will help us to reshape our Windows form.
28 Apr 2015 by Hassan Alrehamy
JSON Deserialization in depth concept and Dictionary mapping. Special Thanks to Dr. Coral Walker
9 May 2013 by Hernán Hegykozi
Versioning file inclusion JavaScript by date of last modification
28 Dec 2013 by immortalus
This is an alternative for "Scroll Synchronization"
3 Apr 2013 by In the Face of God
Generalize to access data in a database via HTTP
19 Apr 2013 by indianDEV
Re-sizing images to equalize the width & height
6 Apr 2011 by intrueder
My alternate uses the AddBezier method, and the size of the heart adjusts to the size of the form.private void Form1_Load(object sender, EventArgs e){ using(System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath()) { path.AddBezier(...
16 May 2011 by J a a n s
For C# guys....using System ;using System.Runtime ;using System.Runtime.InteropServices ;public class Internet{ [DllImport("wininet.dll")] private extern static bool InternetGetConnectedState( out int Description, int ReservedValue ) ; public static bool...
6 Mar 2014 by Jacky Yiu
Visual cryptography is a cryptographic technique which allows visual information (pictures, text, etc.) to be encrypted in such a way that the decryption can be performed by the human visual system, without the aid of computers.
12 Jul 2011 by Jana Sattainathan
There is an easier way to get the Oracle data source than custom-code a TNSNames.ora parser.
6 Feb 2013 by Jarno Burger
A managed wrapper around FreeFrame, to give your video frames some cool effects
5 Nov 2014 by Jeong, WonYoung(Brad)
Making BitField with C# alternative to BitField made with union and struct of C++
27 Nov 2011 by johannesnestler
I'd like to offer a "funny" alternative by using a dummy TextBox. public static Bitmap GetPlainTextBitmap(string strText, Font font, Color colorBack, Color colorText, Size sizeTargetBitmap) { // Create a dummy TextBox TextBox txDummy = new TextBox(); ...
18 Jan 2012 by johannesnestler
Very good tip. I just want to mention an alternative - you can just change your project output type to a console application. (You can undo it later if only needed for debugging). So if you started with a Windows Forms project in Visual Studio: Go to project properties/application/ and in the...
12 Mar 2010 by jp2code
Introduction...
10 Dec 2013 by JRINC
Connect to remote socket via System.Net.Sockets.Socket.Connect method with timeout controlled by System.Threading.Timer
14 Jun 2014 by Kaveh Yazdi Nezhad
A simple solution to capture entire HTML code of a web page which is displaying on Internet Explorer
13 Nov 2011 by KazMaxLtd
This article describes how to hide or show TabControl tabs at runtime
1 Jan 2014 by Kees van Spelde
To encrypt or not to encrypt with C# .NET
20 Jun 2011 by Kiran Sonawane
A trick when using Array.Contains()
13 Sep 2011 by Koshy Panicker John
Different Method(s) to Find IP Address?
29 Sep 2013 by Kundan Singh Chouhan
Simple technique to handle text input and validations in single control
15 Apr 2013 by Lee Louviere
Convert joystick movement into mouse position from a fixed center.
13 Oct 2010 by linebenchmark
Remove all blank lines, containing or not spaces:^:b*$\n
17 Jan 2015 by LLLLGGGG
A really simple implementation of a C# menu for console applications
6 Apr 2014 by LShep
Turn an Enum into a simple state machine via a generic wrapper and modular increment methods
8 Apr 2014 by LShep
This tip describes an IEnumerable extension method that allows you to select an item modulo Count()
17 Jan 2011 by Maxim Fedotov
Presents StringFormat methods with string (not integer) keys in 'format' string.
12 May 2012 by Md. Rashim Uddin
XML Serialization and Deserialization in c#
13 Feb 2014 by Mik Wadstrom
Simple way to use Crystal reports as embedded dynamic printable reports
14 Sep 2011 by Mohammad A Rahman
namespace IpAddresses{ using System; using System.Collections.Generic; using System.Linq; using System.Net; class Program { static void Main(string[] args) { GetIPAddresses().ForEach(ip => Console.WriteLine(ip)); } ...
30 May 2013 by Mohammed Hameed
Check-in/Check-Out mechanism for TFS - To avoid Build errors and improve productivity.