TL
TL

C# Extension Methods

Tim Leffelman

Programmer, Engineer

May 24, 2016

Introduction

Extension methods have been part of the C# programming language since .NET 3.5 / Visual Studio 2008. An extension method is really nothing more than just a static method of a static class that can be called in a special way. In addition to being able to call an extension method directly by specifying the class and method name, an . . .

Read More

C# Question Mark Alias and Operators

Tim Leffelman

Programmer, Engineer

December 10, 2015

The C# language has several different uses for question marks. To programmers unfamiliar with these uses, it can be a bit confusing. However, once you know and understand them, they become second nature just like && and ||.

Operator Name VS C# Framework
a?b:c Conditional Operator 2003 1.2 *
a??b Null-Coalescing Operator 2005 . . .

Read More

C# Methods with Multiple Boolean Arguments

Several Different Ways to Deal with It

Tim Leffelman

Programmer, Engineer

October 23, 2015

Every once in awhile, the need seems to arise to create a method that takes a large number of boolean arguments. The method prototype would like something like the one shown below.

void MyMethod( bool a, bool b, bool c, bool d ); 

From a usage viewpoint, it's generally a bad idea to put too many parameters of the same type in a row within . . .

Read More

Getting Started with Silvrback

Quick References to Get You Up and Running

Tim Leffelman

Programmer, Engineer

September 27, 2015

I have only written a few posts using Silvrback, but so far the experience has gone well. Below is a quick list of things to keep in mind if you have decided to give Silvrback a whirl.

Username

At some point during the registration process, you will be asked to choose a username. Your username will be publicly visible as the subdomain that . . .

Read More

Tally Counting with Roman Numerals

Tim Leffelman

Programmer, Engineer

September 26, 2015

I found this on my Google Drive. It's a document that I had started years ago but never did anything with. Since it was pretty much done (just had to do a bit of Silvrback markdown), I decided to post it here . Who knows...it might help somebody to remember how to count in Roman numerals!


Roman Numerals

Roman numeral can seem confusing . . .

Read More

C# using() statements

Tim Leffelman

Programmer, Engineer

September 19, 2015

In C#.NET, the using keyword is used two different ways:

  • using directive
  • using statement

A using directive at the top of a .cs file imports or aliases a namespace or type throughout the .cs file. Several using directive examples are shown below.

// Import all types from namespace // Types within the namespace can be accessed in code without . . .

Read More

Archive
  Subscribe by Email and Never Miss a Post