HelpSunny
asked on
How to invoke a cs file in C#?
I have different modules for Business Layer, DataLayer, Business Entities layer.
Business Layer --> Contains cs files that contains the Business Logic
Business entities --> Contains cs files that contains attributes
Data Layer --> Contains the cs files that interacts with the DB. The results from this layer will be used to set the Entities attributes values in the Business Layer cs files
Now my requirement is, In the above existing modules{Solution}, I included a new set of independent files in each module. So, I have to invoke the file that I created in Business layer. I have to invoke a method inside the cs file by hardcoding the parameters. Please let me know on how can I implement this.
As in java, is there something called as main method in C#, so that I can diredtly execute the cs file, similar to java like, giving "java ClassName Parameters"
Business Layer --> Contains cs files that contains the Business Logic
Business entities --> Contains cs files that contains attributes
Data Layer --> Contains the cs files that interacts with the DB. The results from this layer will be used to set the Entities attributes values in the Business Layer cs files
Now my requirement is, In the above existing modules{Solution}, I included a new set of independent files in each module. So, I have to invoke the file that I created in Business layer. I have to invoke a method inside the cs file by hardcoding the parameters. Please let me know on how can I implement this.
As in java, is there something called as main method in C#, so that I can diredtly execute the cs file, similar to java like, giving "java ClassName Parameters"
You can create class in DataLayer, Business Entities layer.
Then call them by putting "using" keyword at the top of the cs file.
Then call them by putting "using" keyword at the top of the cs file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank U
Otherwise, you will need to write the csc command line by yourself, which is not integrated with Visual Studio and I dont recommend you to do that.