BLL returning the right Type of an instance

Posted by Younes on Stack Overflow See other posts from Stack Overflow or by Younes
Published on 2010-05-27T10:00:46Z Indexed on 2010/05/27 10:11 UTC
Read the original article Hit count: 313

Filed under:
|
|
|

I have a class "Artikel" and there i write some Business Logic. I also have a class "tArtikel" which is a type. In my class "Artikel" I work with "tArtikel" and returns are of that type. Now when i instantiate an "Artikel" i want it to be of type "tArtikel", so what i tried in my code is:

      public tArtikel Artikel()
      {
        tArtikel artikel = new tArtikel();
      }

Which results in: "'Artikel' member names cannot be the same as their enclosing type".

How would i set this up correctly?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET