C#
Some people may not know that .NET 2.0 provides APIs for accessing everything in a configuration file. The most common question I see relates to accessing the mail settings in the system.net node programmatically. C# using System.Configuration; using
Below is a C# and VB.NET class that demonstrates using System.Net.Mail to send an email. Download C# System.Net.Mail Helper Download VB.NET System.Net.Mail Helper Calling the function from code MailHelper .SendMailMessage( ""
I'm in the progress of upgrading a web application from .NET 1.1 to 2.0 and came across this function that I created which replaces all instances of date/time in a string. In the application users add notes and when it gets saved to the database it
Read More...
Let's say for instance, you want to create a List of your own class, say Employee, where Employee represents an employee. First, we'll start by creating an employee class. [ Serializable ] public class Employee { private bool m_IsSalaried; private int
Read More...
One of the weirder features in C# 2.0 is nullable types. My thinking is as follows: Why complicate things with Nullable
, or its shorter version of DataType? (i.e. int?), instead of allowing null values to be assigned to those data types that
Read More...
Need to access an HttpContext object in a class, but can't because the class doesn't inherit System.Web.UI.Page? Here is a simple helper class that will allow you to access some of the most common HttpContext objects. C# using System; using System.Web;
Read More...
A common DropDownList issue I've seen on many forums and lists is about a DropDownList populating items 2x or not being able to get the selected value on postback when binding to a data source. This is due to the DropDownList having data bound to it again
Read More...
I just answered a post on one of the lists I am a member of that asked how to use pointers in C#. Using pointers in C# is a very bad idea. Pointers reference a location in memory. If the garbage collector is called, the location of an object in memory
Read More...
Here is my latest article in which I discuss the use of the using statement in C# and VB.NET. Using Statement Article R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
Earlier I posted about C# Version 3.0 . I found this blog entry on C# 4.0 (codenamed Yoda) - http://blogs.msdn.com/mattwar/archive/2005/10/09/479008.aspx . R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
The .NET Framwork 2.0 introduces Eval() . Eval() is a shortcut for Container.DataItem() . Since Eval() uses Reflection, it causes overhead. From a optimization standpoint, it is better to use Container.DataItem() . VB.NET Container.DataItem() C# DataReader:
Read More...
C# Version 3.0 Specifications
Have you ever wondered what the next version of C# (3.0) has to offer? Microsoft has published the specifications and they can be downloaded at http://tinyurl.com/baoh8 . R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live
Read More...