Re: Initiating a class



On Jun 28, 11:29 am, christopher_bo...@xxxxxxxxxxx wrote:
hi all.

I am trying to write a program that has a separate class file to the
rest of the functions within the program. How would I go about making
a section of the program run what it is inside the class.

This vague description isn't very helpful. Are you saying that you
have a class (Foo, for example) with a main method and that you want
to use a separate class (Bar) from within Foo's main()? Is Bar
static?

If that's the case and Bar is static, it's as simple as calling
Bar.method(); from within Foo. you just have to make sure Bar.class is
in the same directory as Foo.class when you run it.

Please give some more detail on the situation.

.



Relevant Pages

  • Re: BackgroundWorker question
    ... However, I have a separate class, which does a recursive file copy. ... I'd like to update the status bar as each file is addressed. ... When debugging, the status variable is changed, but it doesn't get reflected ...
    (microsoft.public.dotnet.framework.windowsforms)
  • BackgroundWorker question
    ... I know how to update a status bar using the ProgressChanged event, ... However, I have a separate class, which does a recursive file copy. ... I'd like to update the status bar as each file is addressed. ... When debugging, the status variable is changed, but it doesn't get reflected ...
    (microsoft.public.dotnet.framework.windowsforms)