Click here to Skip to main content
15,891,529 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 Title

C# 2.0 

5 Nov 2014 by Jeong, WonYoung(Brad)
Making BitField with C# alternative to BitField made with union and struct of C++
26 Nov 2014 by Sambhav Yadav - Sam D Silva
ASP.NET page/master page/user control's life cycle from the perspective of Session and View State
24 Jan 2015 by shijo joseph
A file backup manager with simple user interface and all the essential functionalities.
6 Feb 2013 by Jarno Burger
A managed wrapper around FreeFrame, to give your video frames some cool effects
20 Dec 2015 by shijo joseph
An easy to implement yet powerful logging library which requires absolute zero learning curve
17 Jan 2015 by LLLLGGGG
A really simple implementation of a C# menu for console applications
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.
22 May 2010 by DaveyM69
Now your application can update it's saved data regrdless of the account it is running under.
27 Apr 2011 by reachme_saurabh
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...
6 Aug 2012 by Mukund Thakker
19 May 2013 by Yossi Yaari
A basic yet generic state machine implementation
9 Jan 2014 by nasir_ml
ASP.NET textbox validation made easy.
7 Feb 2012 by DaveyM69
How to have a real console window as well as your forms
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...
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 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(); ...
3 Sep 2010 by DaveyM69
A few quick examples of how to correctly create events.
1 Jun 2012 by CoperNick
How suprising can be conversion of decimals to bytes in C#
18 Aug 2014 by Emiliarge
Read and write data to Access databases without limitations caused by the use of the SQL.
6 Mar 2015 by Darkencrow
A multi-drawer style collapsable UI container
30 Aug 2014 by Emiliarge
2 ways to read and write data to *.xls and *.xls files and display it on DataGridView.
4 Jun 2013 by Qwertie
A fast and simple algorithm.
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 Jan 2011 by DaveyM69
How to prevent a CD/DVD drive from being opened.
13 Jan 2011 by Steve Maier
To get this to work in .NET 4, you have to change the DLLImport signature.[DllImport("kernel32.dll", SetLastError = true)]private static extern IntPtr CreateFile( string lpFileName, uint dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, ...
21 Oct 2013 by Sitang Ruan
Central jQuery Version Control
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...
21 Aug 2010 by DaveyM69
How to access a control from a different thread + good alternatives by other members!
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...
22 Aug 2010 by Moim Hossain
Doing like following for few years now :public void AnyMethod(int parameter){ var wrapper = new Action(()=> { // Do your thing here! }); if (this.InvokeRequired) this.Invoke(wrapper); else wrapper();}
21 Feb 2012 by Surjit Singh Dadhwal
This post will help you to resolve problem of checking maxlength of Multiline textbox (Internet Explorer, Chrome & Firefox)
25 Dec 2011 by Gandhi Ashish
Checking Internet Is Connected Or Not From .NET
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...
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 -...
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
8 Aug 2013 by Peter T. Ringering
A complete replacement to Microsoft's Date/Time Picker control.
24 Jul 2012 by Sumon1524
Observu monitors your websites from multiple locations and combines it with measurements collected on your servers. Here this article will show how to send data to Observu.
10 Jun 2010 by Anshul R
The Perfect Translation/Conversion of Code
17 May 2011 by RaviRanjanKr
Convert Text to Image
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(); ...
27 Jul 2015 by Shru37
Modified code from another article to consider field repetitions while converting HL7 message to XML
15 Apr 2013 by Lee Louviere
Convert joystick movement into mouse position from a fixed center.
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.
27 Jan 2013 by AshishChaudha
This tip talks about creating an auto complete textbox using jQuery.
20 Feb 2010 by Rajkumar Reddy Mar31
Recently, one of my jobs demanded me to create a windows service for scheduling some tasks without human intervention, all we need to mention those services XML file.Configure the scheduled tasks in an XML file (Tasks.xml)On Service Start, load the tasks configuration from the Tasks.xml file...
13 Feb 2014 by Mik Wadstrom
Simple way to use Crystal reports as embedded dynamic printable reports
22 May 2010 by DaveyM69
Enables access to the original argument in all events
25 Oct 2013 by Monotosh Roy Mon
XML Serialization & Deserialization for converting our object to XML and XML to Object
24 Jun 2011 by nainakarri
Debugger showing wrong source file when debugging in VS2005
28 Apr 2015 by Hassan Alrehamy
JSON Deserialization in depth concept and Dictionary mapping. Special Thanks to Dr. Coral Walker
18 Jun 2012 by sourabhdev14
The GridView control in ASP.NET is used to represent information from a database in tabular format.
14 Sep 2013 by Shailesh Pisat
Provides ready to use library for sending email using SMTP
12 Jul 2011 by Jana Sattainathan
There is an easier way to get the Oracle data source than custom-code a TNSNames.ora parser.
12 Mar 2014 by apis3445
With C# and the Windows API, you can execute a program in a second monitor.
10 Dec 2013 by JRINC
Connect to remote socket via System.Net.Sockets.Socket.Connect method with timeout controlled by System.Threading.Timer
7 Nov 2012 by Bhasker Kandpal
Exploring the behaviour and capabilities of a property grid control.
17 Dec 2012 by AshishChaudha
This tip describes how to export data to an Excel file from a GridView.
1 Oct 2013 by Rui Jorge Carvalho
Fast and simple Bitmap processor...
2 Apr 2011 by sekharkaza
This code is very useful for those who want to know which aspcontrol has caused the postback.
15 Feb 2015 by Yuri Heymann
Source code for the article titled "A Finite-Difference Model for the Thermal History of the Earth
6 Sep 2010 by DaveyM69
How to convert a generic List of derived types to a generic list of base types.
29 Sep 2013 by Kundan Singh Chouhan
Simple technique to handle text input and validations in single control
22 Mar 2011 by DaveyM69
Starting a thread using a generic argument
22 Mar 2011 by supercat9
Another approach is to use a generic delegate-factory class. Essentially, the class has a field of generic type, a delegate field which accepts an argument of that type, an parameterless instance method which accepts an argument of that type and invokes the delegate with it, and a static method...
17 Jun 2011 by VallarasuS
Here is how you can achieve Gradients used in Office 2010 Buttons with a glow at the bottom.
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...
12 Mar 2010 by jp2code
Introduction...
29 Mar 2011 by Brijesh Kr
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(...
14 May 2014 by atlaste
How to fix hiding controls in the Visual Studio user control designer
27 Aug 2012 by the retired
High performance C# byte array to hex string to byte array.
9 May 2013 by Abhay@Accenture
20 Sep 2012 by Anuraj Parameswaran
Delete a file or folder to Recyclebin using C#
3 Feb 2015 by Péter V
How to detect 64 bit/process on .NET 2.0 to 3.5
8 Apr 2011 by Brijesh Kr
How to disable Autorun C#
13 Nov 2011 by KazMaxLtd
This article describes how to hide or show TabControl tabs at runtime
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...
30 Apr 2013 by Aydin Homay
In the tip, I want to illustrate how to host windows form in windows user control
18 Feb 2012 by Sajid Asghar
How to insert Data in SQL server via SqlDataSource in ASP.NET
12 Dec 2011 by Denno.Secqtinstien
Code that measures a time interval as you would measure the execution time of a task
1 Jan 2014 by Kees van Spelde
To encrypt or not to encrypt with C# .NET
14 Feb 2014 by BenScharbach
How-To Convert a String Collection to a Multi-Enum item using TryParse
20 Nov 2012 by Arno1973
A fix for ImageButtons problem in IE10 when project is not 4.5
19 Apr 2013 by indianDEV
Re-sizing images to equalize the width & height
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...
17 Feb 2010 by William Winner
First, why would you want to change the ToolTip text during the PopUp? Why not hook the MouseHover of the control that you want to change the ToolTip? Dynamically setting the ToolTip does not require hooking the PopUp event.How about: public partial class Form1 : Form { ...
9 May 2013 by Hernán Hegykozi
Versioning file inclusion JavaScript by date of last modification
31 May 2014 by Evgeny Pereguda
This is simple implementation of fast forward 1D DCT-II on MSIL which is generated at runtime.
5 Jun 2012 by Andreas Gieriet
This is an alternative for "Sorting Strings based on the position of the block letter"
31 Jan 2013 by Anand Gunasekaran
Listview Paging Feature to split the records of the listview in sevaral pages.
27 Apr 2007 by Nick Yakov
How to can load a structure with unsafe coding and fill the structure using a byte array.
19 May 2013 by Yossi Yaari
A solution for monitoring Events called during test.
8 Apr 2014 by LShep
This tip describes an IEnumerable extension method that allows you to select an item modulo Count()
3 May 2014 by Yuri Heymann
Source code for the paper titled "A Monte Carlo simulation framework for testing cosmological models"
28 Dec 2014 by Pritam Deshmukh
This tip elaborates few useful tricks and shortcuts of VS 2013 mainly for professional edition (You can find them with Ultimate version too).
13 Nov 2013 by BrokenEvent
Simple and fast .NET XML parser without using System.Xml
17 Aug 2012 by Arman Aşçı
Parallel port data register control with C# .NET 2.0 and inpout32.dll.