Reflection and Interfaces

Today is the last official installment in the series on reflection.  If you’ve been following along, you’ve probably notice that calling code in other classes using reflection is a huge pain in the butt.

(more…)

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Wednesday, April 23rd, 2008

Reflection - Accessing Methods

Today is the next to last installment on reflection.  We will look at how to call methods and pass parameters.  This is going to look a lot like what we’ve already done in previous sessions.

(more…)

Monday, April 21st, 2008

Reflection -The Constructor

Remember, last week we started a series on using Reflection in our .NET applications.  We’ve loaded the assembly already, so the next step is creating the object.  Today’s tutorial will show how to instantiate the object using the default constructor and then quickly move on to using the parameterized constructor.

(more…)

Monday, April 14th, 2008

The easiest way to create a SQL db from Code

(We’ll get back to the series on Reflection next week.)

So, I’ve started experimenting with replacing my TestComplete test scripts with CSharp test scripts.  This shouldn’t be too big of a deal since most of what I’m scripting are web applications and I can control that code via the WebBrowser control.

Well, the first thing my current script does is delete a database and recreate it.  When I went looking for how to create a database, all I could find was code similar to this:

(more…)

Friday, April 11th, 2008

Reflection - Loading The Assembly

Recently, I received a question from a web visitor asking me to cover reflection.  So, I’m going to start a series on reflection.  Remember, if you have any questions you can ask me using the “Ask A Question” form.  Just look for the “Click Here to Ask A Question” button at the top of the page.

Today, we are going to cover loading the DLL…

(more…)

Thursday, April 10th, 2008