-8

Typically in a C# program, the entry point is in Program.cs. However, if you are creating a rather generic class library, with no Main() method, such as

TCPClient.dll

what is the appropriate base class name? (cannot be TCPClient as that is the namespace).

  • 6
    Class libraries have no main entry point so there is no need for a "base class." – MetaFight Oct 25 '15 at 19:05
  • If I have created a generic TCPClient class, for example, that I want to use in multiple projects, how do I avoid creating TCPClient.dll with a base class TCPClient (which I cannot) ? Which is wrong - my DLL name or my class name? – tones31 Oct 25 '15 at 19:11
  • 2
    you can change the namespace to yourcompany or something – Ewan Oct 25 '15 at 19:18
  • 1
    YourCompany.Tcp.TcpClient problem solved – RubberDuck Oct 25 '15 at 21:21
  • The point of make a Class libraries is to have a easy way to share functionality, to distinct a class with the same name to another, use different namespaces. this is a good reference msdn.microsoft.com/en-us/library/ms229026.aspx – Byron Oct 31 '16 at 22:52
-1

There isn't one.

The entrypoint is for your executable. There is one.

Your library has as much business declaring an entrypoint as do all the other files in your program, be they dynamically or statically linked; i.e. none.

Name the classes it declares however you like.

Not the answer you're looking for? Browse other questions tagged or ask your own question.