Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

Archive for July, 2009

July 29, 2009

Recharging…

Filed under: General @ 3:36 pm

Whether it is a brisk walk, a game of golf, killing aliens, or a good book, everyone needs a little down time to recharge. And several times a year, it is good to extend that downtime and let the mind relax and run free. I am lucky enough to have a sister with a lake […]

July 28, 2009

Coalesce and Ternary Operators

Filed under: C#,VB.NET @ 3:12 pm

Coalesce Operator The coalesce operator, also called the null coalescing operator, is new in VB 9 and C# 2.0. It helps you work with nulls (Nothing in VB). The coalesce operator involves two expressions. The first expression must evaluate to a nullable type or reference type. The first expression is the result if the first […]

Inferred Typing

Filed under: C#,LINQ,VB.NET @ 2:01 pm

If you are using Visual Studio 2008 (.NET Framework 3.5) or newer, you can leverage inferred typing. Inferred typing allows the compiler to infer your data types instead of you having to explicitly define the type. Variables that use inferred typing are still strongly typed, they just depend on .NET for determining (or inferring) the […]

Caller Id: Using StackTrace

Filed under: C#,Debugging,VB.NET @ 12:43 pm

There are situations where you may want to know who called a particular method in your application. Maybe you want to log it or use the information for debugging purposes. Whatever the reason, you can get information on the call stack using the StackTrace class. A stack trace is basically information on the active stack […]

July 27, 2009

Finding Controls on Forms

Filed under: C#,VB.NET,WinForms @ 12:43 pm

There are often times that you need to find specific controls on a Windows Form (WinForm). For example, you may want to find all of the TextBoxes to clear their contents, set their background color, or hook up events. You may want to find all of the checkboxes to check or uncheck them. Or find […]

July 24, 2009

Doctor Who

Filed under: General @ 3:57 pm

I remember watching Doctor Who in college when Tom Baker was the doctor. Those were the days before VCR recording and TiVo, so we had to rush home to ensure we caught that next episode. Tom Baker’s Doctor Who was smart, logical, and a little crazy. And always with the striped double-length scarf.     […]

July 23, 2009

Linq: Sorting a DataTable

Filed under: C#,Data,Lambda Expressions,LINQ,VB.NET @ 6:24 pm

Last night, my husband (who is also a .NET developer) asked me about sorting a DataTable by user-defined columns. (Yes, we are a pretty exciting couple!) Most developers that work with DataTables know how to sort the DataTable using a DataView.Sort. If you are interested in that technique, you can view the msdn documentation here. […]

Writing Data from a DataTable to Excel

Filed under: C#,Data,Microsoft Excel,VB.NET @ 3:24 pm

As with most things in Visual Studio, there are many ways to export data from your .NET application to an Excel spreadsheet. This post covers one straightforward technique. First, set a reference to the desired version of the Microsoft Excel Object Library from the COM tab of the Add Reference dialog. The resulting reference appears […]

July 22, 2009

User Control Events in VB and C#

Filed under: C#,VB.NET,WinForms @ 3:58 pm

There are many things in VB.NET and C# that are very similar. So if you know that basic syntax of both languages, it is relatively easy to convert a few lines of code from one to the other. Not so much with events. This is one area where it is easy to get tripped up […]

VB or C#?

Filed under: VB.NET @ 2:15 pm

I learned to program using structured programming techniques with RSTS/E BASIC on a PDP 11/45 and progressed to VAX BASIC on a VAX 11/70. This was before database products were common, so we created our own data structures using hash tables and linked lists. Then came Ingres, and we moved to a relational database system. […]

Next Page »

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