Click here to Skip to main content
15,893,266 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi I Need Some Multilayer Samples In .Net C# Language
I Read Articles, So Without Sample It's Hard To Understand
Posted

1 solution

Of course, nothing hard:
C#
namespace TopLayer {
    using BottomLayer;
    using MiddleLayer;

    internal class TotallyAdHocTrash {
        ApplicationFieldSpecificStuff stuff = new ApplicationFieldSpecificStuff();
        static void Main() {
            //...
            Application.Run();
        } //Main
    } //class TotallyAdHocTrash

    //...

} //namespace TopLayer

C#
namespace MiddleLayer {
    using BottomLayer;

    public class CoolApplicationFieldSpecificStuff {
        CoolAbsolutelyUniversalSystemUtility Utility = new AbsolutelyUniversalSystemUtility();
        //...
    } //class CoolApplicationFieldSpecificStuff

    //...

} //namespace MiddleLayer

C#
namespace BottomLayer {

    public class AbsolutelyUniversalSystemUtility {
        public void AbsolutelyUniversalMethod() { /* ... */ }
        //...
    } //class AbsolutelyUniversalSystemUtility

    //...

} //namespace BottomLayer


If this is not enough, add some more layers. :-)
If this does not seem not informative enough, look at your own question. And finally try to realize: nobody needs layers without the purpose.

—SA
 
Share this answer
 
v2
Comments
Vedat Ozan Oner 27-Jan-14 18:11pm    
:) best example I have ever seen
Sergey Alexandrovich Kryukov 27-Jan-14 18:14pm    
Thank you, Vedat. :-)
—SA
Vedat Ozan Oner 27-Jan-14 18:49pm    
ok, removing my answer not to cause for an ambiguity.
Sergey Alexandrovich Kryukov 27-Jan-14 19:03pm    
Thank you for understanding.
—SA
Matt T Heffron 27-Jan-14 19:12pm    
LOL +5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900