| |

VerySource

 Forgot password?
 Register
Search
View: 1072|Reply: 8

Consult a master about the console program

[Copy link]

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2021-3-1 15:30:02
| Show all posts |Read mode
How can I call the winform method written by myself in the console program in the form of parameters!!!! Urgent... Urgent... Please help!!
Reply

Use magic Report

0

Threads

110

Posts

63.00

Credits

Newbie

Rank: 1

Credits
63.00

 China

Post time: 2021-3-1 16:30:01
| Show all posts
Project->Properties->Application->Output Type->Select "Console Application".
Reply

Use magic Report

0

Threads

119

Posts

67.00

Credits

Newbie

Rank: 1

Credits
67.00

 China

Post time: 2021-3-1 16:45:01
| Show all posts
The original poster does not seem to mean that!
Main(String[] args)
args are the parameters passed to it from outside!
Reply

Use magic Report

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2021-3-1 17:00:01
| Show all posts
Yes,苹果小刀is right
Is to call the method written in winform in the console as a parameter
But how to achieve it????
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

Post time: 2021-3-1 17:15:01
| Show all posts
Is there a difference?
Reply

Use magic Report

0

Threads

110

Posts

63.00

Credits

Newbie

Rank: 1

Credits
63.00

 China

Post time: 2021-3-1 17:45:02
| Show all posts
Why is there such a demand? I feel that the logic is a bit messy...
Reply

Use magic Report

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2021-3-1 20:45:01
| Show all posts
In a word, how to call the method written in winform in the console program??????
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2021-3-1 22:15:01
| Show all posts
Isn’t it enough to specify a parameter to call a corresponding function?
For example: -c then call the function you need to implement the function after analyzing the -c parameter.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2021-3-1 22:30:01
| Show all posts
Dude’s question is too vague

1. Are your console project and winform project the same project?
  If it is not necessary to reference the winform project

2 If it is two classes in a project, you can call the winform class once after instantiating it, but the premise cannot be
  Inaccessible such as private functions

3 If it is in a project, and it is a static function in the winform class, it is directly called without realizing it

4 Be clear about other situations, if I can still see this post, I will answer
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list