Tags: C#

Anonymous Method / Delegate

Benjamin Perkins C#

Delegates in C# are similar to function pointers in C++ and allow methods to be passed as parameters. In this example we will create a delegate called CalculateCharge and a Withdrawal class: [sourcecode language=”csharp”] delegate decimal CalculateCharge(decimal withdrawal); class Withdrawal { public string AccountOwnerName; public decimal withdrawal; public decimal charge; public CalculateCharge calculation; } [/sourcecode] […]

Read More →

Arrays in C#

Benjamin Perkins C#

I always liked the concept of arrays. Being able to conceptually visualize in multiple dimensions took me some time to get my mind around, but in the end I was successful. The example here will discuss 2 dimensional arrays of type single, multiple and jagged. A single dimensional array is the simplest. You simply code […]

Read More →

Hacked

Benjamin Perkins C#

This happened to me way back in 2011.  I am migrating all my blogs and articles to this site and am adding it here.  This shouldn’t happen anymore if you use an ORM like Entity Frame Work or NHibernate.  A few weeks ago I had to fend off a hacker. Some of the database statements […]

Read More →

Language Independence

Benjamin Perkins C#

The most common .Net languages are Visual Basic, C++ and C#. However, there are numerous other programming languages that will function with the .Net Framework. Like, F#, J#, PowerBuilder, IronPython, IronRuby, etc… It is possible to use .Net from many programming languages because they have all agreed on some standards. For example the Common Type […]

Read More →

Interoperability in C#

Programming has been around for some time and we haven’t always had the .Net Framework to make our lives as programmers and support engineers so easy. When we program within the confines of the .Net Framework, we are building managed code. Managed code is compiled in Bytecode. Prior to the .Net Framework we programmed in […]

Read More →

Generics

Benjamin Perkins C#

When we think about the word Generic outside of the programming world it simply means that the object is not tied to any specific kind. An example is a bank account. We may not know which bank it is associated too, if it is a checking or savings account, however we do know that we […]

Read More →