San Diego Code Camp 2010

I hope everyone in southern California is planning to attend this years SoCal Code Camp in San Diego on 6/26 – 6/27. It’s always a great time and lots of free training! I will be presenting the following sessions and I hope you will attend. Also, check out my new .NET discussion site called DotNet … Continue reading San Diego Code Camp 2010

Back-2-Basics: Exception & Event Instrumentation in .NET

Here is a video from a session I did at the San Diego .NET Developers Group Feburary of this year on TraceListeners in .NET and much more. Back-2-Basics: Exception & Event Instrumentation in .NET from David McCarter on Vimeo.

Visual Basic Code Samples

Here is a link to the Visual Basic code samples site. Lots of samples for .NET 4, parallel programming, Office and Sharepoint! http://msdn.microsoft.com/en-us/vbasic/ms789074.aspx

Converting C# and VB.NET Code

If you ever need to covert C# code to VB or the other way, I always use this free online tool: http://www.developerfusion.com/tools/convert/vb-to-csharp/ It does a pretty good job. It does have some issues with complicated LINQ, but it will always let you know. Tip By: David McCarter

Los Angeles Code Camp 2009

I hope everyone in southern California is planning to attend this years Los Angeles Camp on 11/21 - 11/22. It's always agreat time and lots of free training! I will be presenting the following sessions and I hope you will attend. Also, check out my new .NET discussion site called DotNet Army! Building nTier Applications … Continue reading Los Angeles Code Camp 2009

ASP.NET SIG of the San Diego .NET User Group December Meeting

Please join me at the ASP.NET SIG of the San Diego .NET User Group December meeting to check out my session titled Why You Need .NET Coding Standards (2009). This session will guide any level of programmer to greater productivity by providing the information needed to write consistent, maintainable code. Learn about project setup, assembly … Continue reading ASP.NET SIG of the San Diego .NET User Group December Meeting

Checking for a Valid Internet Connection

Since many applications (like Smart Clients) use the internet to send/ retrieve data, it's a good thing to check to make sure the user has access to the internet before making your call. This will prevent connection exceptions. The code below first checks to make sure the user even has a network connection, then tries … Continue reading Checking for a Valid Internet Connection

Retrieving The Name of a Method

There might be times when you need the name of the method when logging Exceptions etc. The code below uses reflection and will also add the class name:     1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load     2       Dim dir = String.Format("{0}.{1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name, System.Reflection.MethodBase.GetCurrentMethod().Name) The output would look like this:>? dir"Form1.Form1_Load"If … Continue reading Retrieving The Name of a Method

Checking Enum Flags

If you using an enum that uses bit flags, here is an easy way to check to see if one or more if the values are set.VBPublic Shared Function CheckFlags(value As [Enum], flags As [Enum]) As Boolean    If [Enum].GetUnderlyingType(value.[GetType]()) = GetType(ULong) Then        Return (Convert.ToUInt64(value) And Convert.ToUInt64(flags)) <> 0    Else        Return (Convert.ToInt64(value) And Convert.ToInt64(flags)) <> 0    End IfEnd Function C#public static … Continue reading Checking Enum Flags

San Diego .NET User Group August Meeting

I hope every enjoyed my talk on the Entity Framework at the August meeting of the San Diego .NET User Group. Below are downloads to the presentation, code and links I mentioned.Slides: Building nTier Applications with Entity Framework Services.pdf (3 MB)Code:sandiegodotnet-EFDemo.zip (945.75 KB)Links:What I Have Learned So Far About The Entity Framework and ADO.NET Data … Continue reading San Diego .NET User Group August Meeting