.NET中的多层编程示例 [英] Multilayer Programming Sample in .NET

查看:62
本文介绍了.NET中的多层编程示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我需要一些多层样本.Net C#语言

我读文章,所以没有样本很难理解

Hi I Need Some Multilayer Samples In .Net C# Language
I Read Articles, So Without Sample It's Hard To Understand

推荐答案

当然,没什么难的:

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

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

    //...

} //namespace TopLayer




namespace MiddleLayer {
    using BottomLayer;

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

    //...

} //namespace MiddleLayer




namespace BottomLayer {

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

    //...

} //namespace BottomLayer





如果这还不够,请添加更多图层。 :-)

如果这看起来不够丰富,请看看你自己的问题。最后试着意识到:没有人需要没有目的的层



-SA


这篇关于.NET中的多层编程示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆