Click here to Skip to main content
15,884,628 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# - Changing background of another form Pin
BobJanova21-Jan-13 5:45
BobJanova21-Jan-13 5:45 
GeneralRe: C# - Changing background of another form Pin
Steven Borges21-Jan-13 8:08
Steven Borges21-Jan-13 8:08 
GeneralRe: C# - Changing background of another form Pin
BobJanova21-Jan-13 13:20
BobJanova21-Jan-13 13:20 
QuestionC# way to create and save a video from locally stored images Pin
codechek20-Jan-13 23:42
codechek20-Jan-13 23:42 
QuestionEDI Parsers Pin
FatCatProgrammer20-Jan-13 12:52
FatCatProgrammer20-Jan-13 12:52 
AnswerRe: EDI Parsers Pin
Simon_Whale20-Jan-13 23:10
Simon_Whale20-Jan-13 23:10 
GeneralRe: EDI Parsers Pin
FatCatProgrammer21-Jan-13 5:37
FatCatProgrammer21-Jan-13 5:37 
QuestionReflection with args.Lenght =0 Pin
PozzaVecia20-Jan-13 12:25
PozzaVecia20-Jan-13 12:25 
suppose I have the following code
C#
class Program
{
    static void Main(string[] args)
    { 
      if( args.Lenght==0){    
    System.Console.WriteLine("Hello, World!");
          }
      else
      {System.Console.WriteLine("Bye Bye, World!");}
    }

}


Using reflection I need to call "Hello, Word!", I try this:
// Load the assembly into the current appdomain
//Name of the above exe should be given as parameter.
System.Reflection.Assembly newAssembly = System.Reflection.Assembly.LoadFrom(@"C:\AppDomains.exe");

// Invoke the Main method.
newAssembly.EntryPoint.Invoke(null, new string[] { null });


But Bye Bye appears...I should look for a solution without changing my Program class of course.
Any idea?
Thanks
AnswerRe: Reflection with args.Lenght =0 Pin
Super Lloyd20-Jan-13 12:38
Super Lloyd20-Jan-13 12:38 
GeneralRe: Reflection with args.Lenght =0 Pin
PozzaVecia20-Jan-13 12:50
PozzaVecia20-Jan-13 12:50 
AnswerRe: Reflection with args.Lenght =0 Pin
FatCatProgrammer20-Jan-13 12:56
FatCatProgrammer20-Jan-13 12:56 
GeneralRe: Reflection with args.Lenght =0 Pin
PozzaVecia20-Jan-13 18:44
PozzaVecia20-Jan-13 18:44 
AnswerRe: Reflection with args.Lenght =0 Pin
PIEBALDconsult20-Jan-13 14:07
mvePIEBALDconsult20-Jan-13 14:07 
GeneralRe: Reflection with args.Lenght =0 Pin
PozzaVecia20-Jan-13 18:42
PozzaVecia20-Jan-13 18:42 
GeneralRe: Reflection with args.Lenght =0 Pin
PIEBALDconsult21-Jan-13 4:47
mvePIEBALDconsult21-Jan-13 4:47 
AnswerRe: Reflection with args.Lenght =0 Pin
Alan N20-Jan-13 22:37
Alan N20-Jan-13 22:37 
QuestionNeed some guide line for few tools which is used for dotnet. Pin
Tridip Bhattacharjee20-Jan-13 8:59
professionalTridip Bhattacharjee20-Jan-13 8:59 
AnswerRe: Need some guide line for few tools which is used for dotnet. Pin
Super Lloyd20-Jan-13 12:40
Super Lloyd20-Jan-13 12:40 
Questionconnect to usb modem Pin
hafez20-Jan-13 0:36
hafez20-Jan-13 0:36 
AnswerRe: connect to usb modem Pin
Andy41121-Jan-13 3:40
Andy41121-Jan-13 3:40 
AnswerRe: connect to usb modem Pin
Cl.Kurtz8-Feb-13 15:24
Cl.Kurtz8-Feb-13 15:24 
QuestionWho can help me to solve this problem ? Pin
905607625@qq.com19-Jan-13 15:32
905607625@qq.com19-Jan-13 15:32 
AnswerRe: Who can help me to solve this problem ? Pin
Dave Kreskowiak19-Jan-13 15:34
mveDave Kreskowiak19-Jan-13 15:34 
GeneralRe: Who can help me to solve this problem ? Pin
905607625@qq.com19-Jan-13 15:40
905607625@qq.com19-Jan-13 15:40 
GeneralRe: Who can help me to solve this problem ? Pin
Dave Kreskowiak19-Jan-13 15:47
mveDave Kreskowiak19-Jan-13 15:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.