Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

Archive for September, 2009

September 25, 2009

Count Lines Of Code

Filed under: C#,Text Files,VB.NET @ 7:34 pm

The number of lines of code is not a very useful metric for evaluating good code or a good developer. However, it is sometimes useful to know how much code you have. For example, I recently worked on a project converting a VB 6 application to .NET. When we were finished, it was interesting to […]

DAL: Using a Data Provider Factory

Filed under: C#,Data,VB.NET @ 6:59 pm

Whether it be SQL Server, Access, Oracle, or mySql, most applications write to one kind of database. But what if your application requirements are such that you have to support multiple database types? Then the DbProviderFactory is for you. For example, say you are building a product to sell to HR departments. Some of your […]

September 21, 2009

Write a Memorization Helper Application

Filed under: C#,VB.NET,WinForms @ 7:24 pm

Though this is not necessarily a common requirement, this post demonstrates the following techniques. Converting a text string to an array. Passing data from one form to another on a constructor. Picking a unique set of random numbers. Using the set of random numbers to pick a set of items from an array. Building controls […]

Passing Data Between Forms: Constructor

Filed under: C#,VB.NET,WinForms @ 6:14 pm

It is often necessary for one form in your WinForms application to pass information to another form in your application. Though there are multiple ways to pass the data, this post focuses on using a form constructor. Take a simple case, on Form1 there is a TextBox1 where the user enters data and clicks Button1. […]

Randomly Pick Items From a List

Filed under: C#,VB.NET @ 5:29 pm

There are often times in most applications where you need to work with lists. You may have lists of customer types or list of settings or lists of numbers. Regardless of the type of item in your list, this post describes how to randomly pick a set of items from the list. In this example, […]

Splitting Text into Words

Filed under: C#,VB.NET @ 4:25 pm

There are times when you need to work with a set of text as individual words. For example, you need to count the occurrence of each word or convert the first letter of each word to a capital letter or randomly pick specific words. One easy way to convert a set of text into individual […]

September 16, 2009

Using the Code Snippet Editor

Filed under: C#,VB.NET,Visual Studio @ 7:34 pm

After my post on Using Code Snippets, several people have asked about the Code Snippet Editor. As stated here, "the Snippet Editor allows for easy management and creation of code snippets for Visual Studio." You can find out more and download the Snippet Editor from codeplex. Bill McCarthy, the author of the Snippet Editor, did […]

Binding Control Properties to Business Object Properties

Filed under: C#,Data Binding,VB.NET,WinForms @ 6:32 pm

As stated here, you use object binding in a WinForms application by following these steps: 1. Build the business objects for your application. 2. Define a business object data source in the Windows Application project containing your user interface. 3. Bind properties of the controls on the form to business object properties. The first two […]

September 8, 2009

Using Object Binding

Filed under: C#,Data Binding,VB.NET,Visual Studio,WinForms @ 5:23 pm

As stated here, you use object binding in a WinForms application by following these steps: 1. Build the business objects for your application. 2. Define a business object data source in the Windows Application project containing your user interface. 3. Bind properties of the controls on the form to business object properties. Building the Business […]

Understanding Object Binding

Filed under: C#,Data Binding,OOP,VB.NET,Visual Studio @ 2:26 pm

Before going through the details of how to use object binding, it is important to understand exactly what it is—and what it is not. Object binding is binding your business object properties to user interface elements. Object binding is not database binding in the strict sense of the term. It does not directly collect or […]

Next Page »

© 2014 Deborah's Developer MindScape   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs