KnowDotNet NetRefactor

.NET Basics

This section contains articles relating to various aspects of programming in .NET.  


Articles  

Writing Plug-Ins for Loose Coupling of Application Components -
How do I write a Plug-in for an application and how do I know whether a DLL implements an Interface that my application expects?     more...

Use Activator.CreateInstance to Create Objects from a String Name -
How can I create an object of a class by using its string name instead of creating it directly? By using Activator.CreateInstance as demonstrated in this article.    more...

Generate Classes From a Document -
How can I create code from an existing table in a document. For example, I have numerous input descriptions in Word Tables. This article shows you how to use the table data to create input classes automatically.    more...

Design Patterns - Facade Pattern -
Have you learned Design Patterns? You probably need it on your resume and they will improve your coding. This article will demonstrate another simple Design Pattern called the Facade Pattern.    more...

Design Patterns - The Strategy Pattern -
Many times we may be using Design Patterns without knowing that we are using a pattern and certainly without knowing what the particular pattern is called.     more...

C# and VB.NET Gotcha - Select Case Using Nothing Does Not Raise Exception -
In C# and VB.Net a Select Case against a variable set to Nothing will not throw an exception; watch out.    more...

Get Data From DataGridView SelectedRows -
How do I get a collection of selected rows in a DataGridView? Sometimes the simpliest things can appear to be complex and consume an inordinate amount of time to figure out.     more...

Retrieve My.Settings From Loosely Coupled DLL in C# and VB.NET -
How can I retrieve settings of an executable's appConfig from a loosely coupled DLL? This article will show you in VB.NET and C#.    more...

Compute Excel Column Number from Integer Column Number -
How can I compute any Excel column name from "A" to "ZZ" from an integer column number? This article will show you how.    more...

Use Namespace Alias To Get Intellisense on Consts in DLL -
Why can't I see public const in a DLL from a C# application? You can, but you need to use a Namespace Alias.    more...


plus 163 more...

Code  

ListView Drag & Drop With Auto Scrolling in .NET (Upgraded) -
Need to have your ListView scroll while using Drag and Drop? This article shows the code. It's not complex, but the documentation is hard to locate in .NET.    more...

Print Contents of Grid or ListView -
I am constantly faced with the requirement to print the contents or selected columns of a DataGrid or ListView. This article presents a description and all of the code for a demo project to accomplish this.    more...

Updater Application Block - Writing a Wrapper DLL -
How do I write a wrapper DLL so that I can use it over and over without duplicating all of the self-updating code and use it in both VB.NET and C# Applications? In this article, I will show your the code (C#) for a DLL that wraps the Upadater Application Block.    more...

.NET Printing is Different, but much more Powerful and Flexible than in VB6 -
Why Migrate to .NET? Printing is completely different, but much more powerful and flexible than VB6.    more...

TextToStringBuilder -
Let this FREE tool build code for a StringBuilder based on your text input. Great for long message strings or SQL queries. Generates code in VB.NET or C#.NET.    more...

Use XML Files to Replace The Registry for GetSetting And SaveSetting VB Functions -
If your application has to save settings, you should not count on being able to write to the system Registry. Why not use an XML file to save your settings?    more...

Dealing with Colors in VB.NET -
The System.Drawing.Color enumeration in .NET provides a whole host of colors and is very easy to use. For instance, if I wanted to change the background color of a form, I could use the following:    more...

RichTextExplorer -
Download RichTextExplorer today and simultaneously edit the RTF and Text of a document. Executable and full source code are available.    more...

Writing Add-Ins for Visual Studio .NET
Writing Add-ins for Visual Studio .NET
by Les Smith
Apress Publishing