.NET Answers

ASP.NET, HTML, CSS, Visual Studio, CSharp, VB.NET and other programming items of interest.
Subscribe

Reflection -The Constructor

April 14, 2008 By: Dave Category: none

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…)

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

The easiest way to create a SQL db from Code

April 11, 2008 By: Dave Category: none

(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…)

Reflection - Loading The Assembly

April 10, 2008 By: Dave Category: none

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…)

Serializable attribute vs Serializable Interface

April 09, 2008 By: Dave Category: none

Judging from the comments I received yesterday, it looks like we need to review  serialization in .NET.

(more…)

Unique SQL Logins and SqlMembership Provider

April 02, 2008 By: Dave Category: none

There are cases where it is advantageous to have a separate sql login for each user login who will be editing your database.  If you are using Windows authentication, this is not a problem because you can pass the windows authentication tokens on through to the db without having to do a whole lot of work.

But, what about times where setting up a separate windows user for each person who will be accessing the system is more work than it’s worth, or as is the case in shared hosting plans, just isn’t practical?

(more…)