C# Corner

Resources  
  • Creating and Using Custom Attributes in C#Feb 27, 2000. Attributes are classes that allow you to add additional information to elements of your class structure.
  • ColorDialog in C#Dec 21, 2000. A ColorDialog control is used to select a color from available colors and also define custom colors. This article demonstrates how to use a ColorDialog in Windows Forms and C#.
  • Using ListViews in C#Jan 18, 2001. As a Visual C++ user for 10 years I can say that Microsoft deserves praise for their new ListView class. The MFC ListView class was, well, unpleasant to use. C# makes life a bit easier with a richer property and method set for ListViews. Also, you can now, set the ListView to select an entire row in report mode, something that in Visual C++ you had to write a whole custom ListView control to do. Note also the nice grid lines.
  • Creating a Login User ControlApr 16, 2001. In this article, we have started with an introduction to the UserControl and have learnt to use the ADO+ DataReader.As we seen User Controls simplifies several common Web application scenarios.User Controls allow developers to easily define custom controls using the same programming techniques for writing Web Forms.
  • Defining Custom Entry PointsApr 30, 2001. In this article i am going to demonstrate how we can manipulate the IL code to change the behaviour of how the .NET programme executes.
  • Message Box BuilderAug 14, 2001. This program will help you using MessageBox Class. Program generates code from what you choose.
  • Interface Components Interoperability Aug 27, 2001. The fundamental concept behind both COM and DCOM is the interface. An interface is an agreement between a client and an object about how they will communicate with each other.
  • Using Attributes in C#Sep 14, 2001. This article shows how to create custom attribute classes, use them in code, and query them.
  • How to create a "ComboBox button" in a toolbar in .NETNov 20, 2001. You can actually put a ComboBox in your toolbar by just dragging a ComboBox from the toolbox onto the toolbar but if you want the ComboBox to be one of the toolbar buttons, you are out of luck using the regular old ComboBox. One way around this is to use the DropDownMenu style of a ToolbarButton to create a pseudo-ComboBox.
  • Creating a Custom Data AdapterDec 03, 2001. A good programmer needs to know how to work with ADO.NET DataAdapters at the code level.
  • Custom FileDialogJan 18, 2002. The purpose of this article is to give a simple example showing how easy it is to create a custom FolderDialog.
  • Peer-to-peer Chat Program using Asynchronous SocketMar 22, 2002. This is a simple chat program, which uses asynchronous socket to provide connection between two machines.
  • .NET Performance Counters, Part 1: Predefined CLR Performance CountersMay 13, 2002. In this article, I will describe what a performance counter is and introduce you to the predefined counters that you can use to monitor the state of the CLR while your applications run.
  • Sorting MultiColumn ListView Windows Forms ControlMay 20, 2002. If you want to sort on the first column of a ListView, simply click the Sorting in the properties Window and choose Ascending or Descending as a value. If you want to do sorting in all the columns of a ListView, you need to write custom sorting using the ListViewItemSorter property.
  • Case Study: Demo Networking Financial System May 23, 2002. In this tutorial I will discuss some of the design and development issues that one might consider when using .NET framework for developing Network affiliated applications.
  • Custom Error Handling in ASP.NETMay 30, 2002. Structured exception handling is a fundamental part of the CLR and provides .Net programmers a great way of managing errors. In addition to CLR exception system, ASP.Net also provides ways of handling errors.
  • Configuring Applications in .NETJun 06, 2002. The .Net Framework provides a very convenient and flexible way to configure applications at run time.
  • Using Installer Classes to Ease Deployment in VS.NETAug 07, 2002. In this article I will demonstrate how to incorporate installer classes with your Visual Studio .NET msi's to handle any supporting tasks that your assemblies may need.
  • DataGrid Customization Part-II: Custom Sorting and DataGrid Column HidingAug 13, 2002. How to I get the name and index of the Column headers? How do I find out if mouse click right click was on a column
  • Creating Strongly Typed Custom Collections in C#Sep 02, 2002. In this article, author shows you how to create and use strongly typed custom collections.
  • User Management Utility for Web Form Authentication.Sep 06, 2002. This article deals with the management of user login and password information for a Forms Authentication in ASP.NET.
  • Attributed Programming in .NET using C#Oct 04, 2002. In this article, I illustrate the power of attributed programming by examples that show a modular approach to issues that can crosscut many classes. Attributes will provide exciting software development abstractions in the future.
  • Customize User Interfaces and Pass User Input to Installer ClassesOct 19, 2002. In this article I am going to demonstrate how to customize your MSI install to prompt the user for some information and then pass this information to an installer class. This can be useful when needing to do something during an install based on the user input.
  • Platform Invocation Services in .NET FrameworkOct 25, 2002. This article will cover the details of Platform Invocation Services provided in .Net Framework. Platform Invoke Services acts as a bridge between the managed and unmanaged code. This service enables managed code to call unmanaged functions which are being exposed by any dynamic link libraries (DLL’s) such as Win32 API’s or any custom DLLs.
  • Customize User Interfaces and Pass User Input to Installer ClassesOct 29, 2002. In this article I am going to demonstrate how to customize your MSI install to prompt the user for some information and then pass this information to an installer class. This can be useful when needing to do something during an install based on the user input.
  • DTS Custom Task in C#Jan 28, 2003. During last year I wrote an article about DTS and how to use it in C#. In that article I stated that I didn’t manage to solve the problem related to CustomTask. Today I finally forced myself to tackle that problem again and here is the result. Writing simple CustomTask in C# is the easiest part.
  • Developing Secure Web Sites with ASP.NET and IIS - Part IMar 04, 2003. Developing security for a site is like paying tax. You know it should be done at the end of financial year.
  • Developing Secure Web Sites with ASP.NET and IIS: Part IMar 04, 2003. Developing security for a site is like paying tax. You know it should be done at the end of financial year. But you keep it for the last and some time expect you should never have to do it. It is a similar kind of situation when building a web site. There are some web sites available to general public that can be access by any one. The security for these sites can be minimum or none at all. There are some web sites that publish and hold important information that have to be secure one way or another.
  • Execution-Time Code Generator for C#Mar 06, 2003. The Common Language Runtime provides a new way of doing things. The compile-time world still exist, but it is also possible to build dynamic systems where new code is added by loading assemblies or even by writing custom code on the fly.
  • Basics of Extending Your Working Environment in Visual StudioApr 10, 2003. Visual studio.net offers a wide variety of options, which enable the user to create custom and personalized Visual Studio working environments.
  • Basics of Extending Your Working Environment in Visual StudioApr 10, 2003. All of us have used Macros in Microsoft Office and Add-ins in Visual Studio 6 and I am very sure all of us have been impressed as well by their power to control their own working environment.
  • Implementing Custom Paging in ASP.NET DataGrid ControlJun 01, 2003. This article shows you how to implement custom paging in ASP.NET DataGrid control.
  • Custom ComboBoxJul 11, 2003. The attached source code is a C# application that demonstrates how to create a custom ComboBox control in Windows Forms.
  • Custom Exceptions using Microsoft Exception Management Application BlockSep 02, 2003. This article shows you how to use Microsoft Exception Management Application Block to write custom exceptions.
  • Automatically Break into Code When Calling Debug.AssertDec 22, 2003. This sample creates a dll that once referenced by your ASP.Net or Web Service app, just adding a small block of xml into your web.config file will cause the debugger to automatically break into your code.
  • Deployment: Customizing your .NET deployment ProjectsDec 29, 2003. The fact of the matter is that Visual Studio.NET already contains everything you need to create a rich setup experience for your users. In this article we are going to show you two ways to add a readme dialog to your application, the easy way and the hard way. The easy way requires absolutely no coding. The hard way requires coding and actually allows you to add complex custom features to your application.
  • DataView in C#Feb 17, 2004. The ADO.NET DataSet is a data construct that can contain several relational rowsets, the relations that link those rowsets, and the metadata for each rowset. The DataSet also tracks which fields have changed, their new values and their original values, and can store custom information in its Extended Properties collection. The DataSet can be exported to XML or created from an XML document, thus enabling increased interoperability between applications.
  • DataSet in C#Feb 17, 2004. The ADO.NET DataSet is a data construct that can contain several relational rowsets, the relations that link those rowsets, and the metadata for each rowset. The DataSet also tracks which fields have changed, their new values and their original values, and can store custom information in its Extended Properties collection. The DataSet can be exported to XML or created from an XML document, thus enabling increased interoperability between applications.
  • DataAdapter in C#Feb 17, 2004. The ADO.NET DataSet is a data construct that can contain several relational rowsets, the relations that link those rowsets, and the metadata for each rowset. The DataSet also tracks which fields have changed, their new values and their original values, and can store custom information in its Extended Properties collection. The DataSet can be exported to XML or created from an XML document, thus enabling increased interoperability between applications.
  • DataReader in C#Feb 17, 2004. The ADO.NET DataSet is a data construct that can contain several relational rowsets, the relations that link those rowsets, and the metadata for each rowset. The DataSet also tracks which fields have changed, their new values and their original values, and can store custom information in its Extended Properties collection. The DataSet can be exported to XML or created from an XML document, thus enabling increased interoperability between applications.
  • DataTable Events in C#Feb 17, 2004. The ADO.NET DataSet is a data construct that can contain several relational rowsets, the relations that link those rowsets, and the metadata for each rowset. The DataSet also tracks which fields have changed, their new values and their original values, and can store custom information in its Extended Properties collection. The DataSet can be exported to XML or created from an XML document, thus enabling increased interoperability between applications.
  • Constructing a DataTable using C#Feb 17, 2004. The ADO.NET DataSet is a data construct that can contain several relational rowsets, the relations that link those rowsets, and the metadata for each rowset. The DataSet also tracks which fields have changed, their new values and their original values, and can store custom information in its Extended Properties collection. The DataSet can be exported to XML or created from an XML document, thus enabling increased interoperability between applications.
  • DataTable in C#Feb 17, 2004. The ADO.NET DataSet is a data construct that can contain several relational rowsets, the relations that link those rowsets, and the metadata for each rowset. The DataSet also tracks which fields have changed, their new values and their original values, and can store custom information in its Extended Properties collection. The DataSet can be exported to XML or created from an XML document, thus enabling increased interoperability between applications.
  • Data Binding in DataGrid Control using C#Feb 17, 2004. The ADO.NET DataSet is a data construct that can contain several relational rowsets, the relations that link those rowsets, and the metadata for each rowset. The DataSet also tracks which fields have changed, their new values and their original values, and can store custom information in its Extended Properties collection. The DataSet can be exported to XML or created from an XML document, thus enabling increased interoperability between applications.
  • New Features in C# 2.0 : Part 2Mar 10, 2004. In this article I will talk about iterators, anonymous methods, and partial classes.
  • Avoid Memory Leaks with Destructor and DisposeJul 01, 2004. Here are two classes that allocate resources, the first class needs to implement a custom destructor and standard Dispose, but the second class doesn't need either.
  • Introduction to ASP.NETNov 17, 2004. I have seen many tutorials on ASP.NET but most of them starts with coding and writing your first ASP.NET program. But here I have written this tutorial for explaining why there is a need for ASP.NET when classy ASP is working fine, what are the underlying technology behind ASP.NET, and what programming model ASP.NET provides to programmers.
  • Moving C Structures into .NET with Custom MarshalingDec 17, 2004. Microsoft provides several attributes for marshaling C to C#. In our example we will take the case where we have hundreds of structures and only a few API calls, so we only need to generate the marshaled code for the structures.
  • Best Practices of Exception ManagementMar 08, 2005. Exception management is one of the key area for all kinds of application development .You should adopt an appropriate strategy for exception management to build high quality and robust application .It is a very powerful concept and makes the development work very easy if its used efficiently.
  • C# Custom Dial ControlMar 17, 2005. This article shows how to create and use custom dial control.
  • Localizable Message Box ControlApr 02, 2005. This is localizable MessageBox control. Buttons on standard windows message box controls are always Yes, No, Abort, Cancel, OK, Ignore, Retry. I needed different text on my message boxes so I decided to develop custom message box control.
  • Best Practices of CodingApr 13, 2005. This document covers a few recommendations to leverage the quality of the code in .NET using FXCop 1.30 and how to write custom rules through an introspection engine.
  • Revised C# Control of a DialMay 02, 2005. The C# Custom Dial Control is a custom dial control written using GDI+ and C#. This article and the attached source code is a revised version of my previous article with an extended version of the control.
  • Session Management in Web Garden using Custom ComponentsMay 17, 2005. This article provides an insight on creating a custom Session Manager component using C#.
  • Session Management in Web Garden Using Custom Components May 17, 2005. This article provides an insight on creating a custom Session Manager component using C#.
  • Custom Exception Handling in C#May 17, 2005. This article discusses the implementation of Custom Exception Handling using the existing features of C# .Net.
  • Custom Calendar ControlMay 19, 2005. The Custom Calendar Control described in this article overcomes the limitations of the DateTimePicker by enhancing the capabilities of the existing MonthCalendar Control available in Visual Studio .NET.
  • Custom Mouse-Joystick in C#Jun 10, 2005. It is a custom control that allows you to use your mouse as a joystick.
  • Revised Gauge Custom Control in C#Jun 10, 2005. This is an enhanced version of the custom guage. Enclosed are the source code for the control, and the test program.
  • Custom Assembly in Reporting ServicesJun 30, 2005. This article describes a problem that occurs when you access a custom assembly in your Reporting Services report that does not have sufficient permissions on the resources in your environment. The article also provides simple steps to grant permissions to the custom assemblies that are used in the reports.
  • Custom Error Handling Using ASP.NETJul 07, 2005. Sometimes in your application, you may want to show some decent error messages other than red error messages and some message when page is not found or server is busy. We will see custom error message handling mechanism in this article using ASP.NET.
  • Windows Forms Base ArchitectureJul 14, 2005. This base architecture is well suited for windows based development. This ease the development time required as well as it is developer friendly.
  • Get difference between two dates in C#Aug 05, 2005. This code snippet shows how to get difference between two dates in C#.
  • M.S. Visio AutomationAug 19, 2005. This article demonstrates the flexibility of Visio products as a development platform by describing the customized business solutions.
  • Enabling Membership Provider for SQL Server 2005Aug 22, 2005. ASP.NET 2.0 brings an important concept called provider model which is used for many new feature i.e. Membership Management, Role Management, Profiles, Web Parts Personalization etc.
  • How do I Generate Random Number in C#?Oct 05, 2005. This code snippet shows how to you generate a random number between a range in C#.
  • How do I Implement Custom Event Handling in C#Oct 27, 2005. In this article, we are going to show, how we can call custom event on our designed conditions.
  • Using Snippets in Visual Studio 2005Nov 10, 2005. Visual Studio contains several built-in intellisense code snippets. Snippets are like templates and can be described completely in XML. If you understand the snippet xml schema, you can easily begin to create your own snippets.
  • Building Windows Longhorn Applications using Visual Studio codename WhidbeyNov 15, 2005. The preview version of the next version of Visual Studio 2003 is called Visual Studio codename Whidbey. Visual Studio Whidbey has a support for building applications for Windows codename Longhorn, which is a new addition to the Windows operating systems series and successor of Windows XP.
  • Creating Custom Template for Web User Control in Visual Studio.NET 2003 Nov 25, 2005. This article shows you how to create custom template for web user control in visual studio 2003. The attached sample application will install the custom template for the name given for either VB or C# language and also uninstall the custom template.
  • Automated Backup with NAntNov 26, 2005. An article describing how to use the NAnt build tool to create a custom, automatted backup process.
  • Generating Excel Reports using ASP.NET and C#Dec 29, 2005. This article and code snippet shows how to generate Excel reports from ASP.NET using Excel objects in .NET Framework.
  • The GrouperJan 25, 2006. The Grouper is a special groupbox control that is rounded and fully customizable. The control can paint borders, drop shadows, gradient and solid backgrounds, custom text and custom icons.
  • Creating Custom Templates in SharePointJan 29, 2006. This article is all about creating custom templates in SharePoint.
  • ASP.NET Caching: SQL Cache Dependency With SQL Server 2000Jan 30, 2006. SQL cache dependencies are one of the most wonderful new features in ASP.NET 2.0, the ability to automatically invalidate a cached data object (such as a DataSet or Custom Data Type) when the related data is modified in the database. This feature is supported in both SQL Server 2005 and in SQL Server 2000, although the underlying plumbing is quite different.
  • Exception ManagementFeb 02, 2006. Correct exception handling in your Web pages prevents sensitive exception details from being revealed to the user. The following recommendations apply to ASP.NET Web pages and controls.
  • Custom Drawing Cursors in C#Mar 14, 2006. Some time ago I have decided to try to make something like a "Photoshop" in C#. The first problem has appeared was custom cursors. If you are familiar with "Photoshop" you know that when you change brush size the cursor size also changes. This is solution to make this possible in C# .
  • Antialiased Analog ClockApr 04, 2006. This is an antialiased analog clock sample written in C# using GDI+. It has no flicker at run time because of using Double Buffering technique, and it has many properties that you can customize it such as tick and hand colors, gradient background color, custom date and hand styles.
  • Limitations of ArrayLists in C#Apr 13, 2006. This article discusses some features of ArrayLists and there shortcomings/limitations.
  • Introducing ASP.NET 2.0Jun 14, 2006. In this article, the author examines the fundamentals of ASP.NET 2.0 with the help of code snippets.
  • Sorting Collection of Custom Type using GenericJul 06, 2006. This article shows a simple and easy way to sort the business object collection using generic.
  • Using Custom Tasks in MSBuild to modify XML Configuration Files on the FlyJul 28, 2006. This article shows you how to use MSBuild to build your project and how to create a custom task that will allow you to modify sections of your XML configuration files.
  • Google Checkout Custom ControlAug 14, 2006. A custom control that easily integrates your website with Google Checkout.
  • Building Custom Paging Web FormAug 21, 2006. Sometimes we may need to build our own data objects instead of using DataSets & DataTables. But in this case, we will lose all paging and sorting facilities that is represented using DataSets & DataTables. To overcome this small issue we'll have to write our own custom paging feature as well as with sorting.
  • Retrieve Oracle BLOB and Save as a JPG Using ASP.NET 2.0Sep 01, 2006. The attached code snippet in this article shows how to retrieve Oracle BLOB column data and save as a JPEG file using ASP.NET 2.0 and C#.
  • Creating a Workflow solution in SharePoint 2003Sep 18, 2006. There has always been a great demand for workflows in SharePoint. If you are a programmer, you can create a workflow solution of yourself and integrate it into SharePoint. In this article, I will give you some tips on how to create a workflow solution of your own.
  • Pull a column value from another list in your site in Sharepoint Portal ServerSep 21, 2006. In document and form libraries, you can create custom columns or metadata properties and interestingly, you can autopopulate these columns with data that can be hardcoded or extracted from other lists that are part of the same site where your document library is located.
  • Custom Events and Delegates, An OverviewNov 22, 2006. An overview instructing you how to create delegates and custom event handlers in C#.NET.
  • Flash Player Custom Control for ASP.NET 2.0Dec 05, 2006. This article describes a quick and simple approach to creating a custom web control used to display shockwave flash files within an ASP.NET page. Whilst the article and demonstration project are focused upon displaying a shockwave flash (SWF) file, the basic idea is applicable to any sort of object that you may wish to embed within an ASP.NET 2.0 page.
  • Gradient Background Tab Custom ControlDec 06, 2006. This article describes a quick and simple approach to creating a tabbed custom control with a gradient background.
  • Gradient Panel Custom ControlDec 07, 2006. This article describes a quick and simple approach to creating gradient panel custom control.
  • Implement Microsoft DirectX Image Transformation Filters in ASP.NET 2.0Dec 07, 2006. This article describes an easy approach to creating custom Web controls used to display Microsoft DirectX Image Transformation filter effects in an ASP.NET 2.0 web page.
  • Create Your Own Custom File TypeDec 08, 2006. This article describes a simple approach to creating a custom file type.
  • Event and Error LoggingDec 15, 2006. This article describes an approach to writing to a custom error log and to writing events into the system event log.
  • Extending the ASP.NET ImageButton ControlDec 18, 2006. This article describes an easy approach to extending an existing ASP.NET control; in this example, the standard toolkit’s Image Button control is extended to support roll-over effects. Given the standard control already contains existing support for both server side click events and client click events, the control is well furbished prior to the addition of the roll-over effect.
  • Build Your Own Visual Studio: An Application Framework for Editing Objects at Run TimeDec 22, 2006. This article describes a generic application framework that may be of some use in projects that would need an interface similar to Visual Studio. The application demonstrates approaches to providing a toolbox, a workspace, an object treeview, and an object editor.
  • Extend the Textbox Control to Validate Against Regular ExpressionsJan 05, 2007. This article describes an approach to validating text box entries against a regular expression.
  • ASP.NET 2.0 Visio Custom ControlJan 15, 2007. This article describes a quick and simple approach to creating a custom web control used to display Microsoft Visio files within an ASP.NET page using Internet Explorer.
  • Embed PDFs into a Web Page with a Custom ControlJan 23, 2007. This article describes an approach to embedding and displaying PDF documents in a web page through the use of a simple ASP.NET 2.0 custom server control.
  • An Easy Way to Embed Word in a Web PageJan 24, 2007. This article describes an approach to displaying word documents within a web page using a simple custom server control.

About Custom-Snippet

NA
File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!
Download Free eBooks