notsosharpincsharp
notsosharpincsharp

Reputation: 15

Splitting 1600 line cs project in to multiple files- eg one per class. How to compile with csc?

I have a file called say project.cs which I now compile via csc project.cs into project.exe .

I now want to pull one of the classes- class1, used in this file out and house it in a separate file.

How would I go about this- what would the file need to be called/how would I compile my project from these two files?

Upvotes: 1

Views: 99

Answers (1)

Cyral
Cyral

Reputation: 14153

After splitting your file into multiple smaller files/classes, simply list them one by one after declaring the output type.

csc.exe /out:project.exe class1.cs class2.cs class3.cs

Upvotes: 1

Related Questions