PC Review


Reply
Thread Tools Rate Thread

basic reflection usages

 
 
puzzlecracker
Guest
Posts: n/a
 
      17th Oct 2008
Could someone provide an example or suggest tutorial whereby i can use
reflection to create an object instance whose class implements certain
interface.

Here is what I have

namespace MyFoo{
internal interface IFoo{

void Run(string [] args);

}

public class Bar:Foo{

public Run(string []args ){}

}

class Test {

static void Main(string[] args)
{
stirng className="Bar";
//I want to create an instance of the class and call method Run

}
}

Thanks
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
lambda usages puzzlecracker Microsoft C# .NET 7 23rd Oct 2008 04:29 AM
Re: Usages of a SortedList Vinzenz Feenstra Microsoft VC .NET 1 15th Jul 2006 11:24 AM
svchost CPU USAGES goes 100% =?Utf-8?B?cHJha2FzaA==?= Windows XP Networking 1 17th Feb 2005 02:28 PM
iexplore.exe using 91% cpu usages Arjun Windows XP General 1 4th Jan 2005 08:59 AM
Reflection (again!)--how do I identify a Visual Basic Module? Jeff Johnson [MVP: VB] Microsoft Dot NET Framework 3 12th May 2004 11:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:22 AM.