How do I compile C# code as a library instead of an executable?

后端 未结 5 677
盖世英雄少女心
盖世英雄少女心 2021-01-12 02:56

I have a C# console application in Visual Studio 2010. It has a Main() method as well as a bunch of utility classes. I\'d like those utility classes to be available to other

5条回答
  •  不思量自难忘°
    2021-01-12 03:41

    You do not need to build it as a dll. VS 2010 (and IIRC 2008) allow referencing exe assemblies. All you need is for they relevant types to be declared public - top-level classes defualt to internal if you don't add a specifier.

提交回复
热议问题