zoukankan      html  css  js  c++  java
  • 7.4 命名空间别名

    7.4.1 限定的命名空间别名

     1 using WinForm = System.Windows.Forms;
     2 
     3 namespace Test01
     4 {
     5     class WinForm { }
     6     class Program
     7     {
     8         static void Main(string[] args)
     9         {
    10             Console.WriteLine(typeof(WinForm::Button));
    11             Console.ReadKey();
    12         }
    13     }
    14 }

    7.4.2 全局命名空间别名

     1 using System;
     2 class Configuration { }
     3 namespace Test01
     4 {
     5     class Configuration { }
     6     class Program
     7     {
     8         static void Main(string[] args)
     9         {
    10             Console.WriteLine(typeof(Configuration));
    11             Console.WriteLine(typeof(global::Configuration));
    12             Console.WriteLine(typeof(global::Test01.Configuration));
    13             Console.ReadKey();
    14             /*
    15             Test01.Configuration
    16             Configuration
    17             Test01.Configuration
    18              */
    19         }
    20     }
    21 }
  • 相关阅读:
    http协议
    db2 将逗号分隔数据转换为多值IN列表
    jquery deferred
    ps -ef|grep htpd|wd -l
    mysql 触发器
    css 五角星 (转)
    java 问题
    浏览器假死
    js math atan2
    CSS伪类选择器
  • 原文地址:https://www.cnblogs.com/kikyoqiang/p/10035546.html
Copyright © 2011-2022 走看看