zoukankan      html  css  js  c++  java
  • C# 一些小东东

    1. 在C#中,如果有一个方法我们不想继续使用,需要废弃的时候,可以在该方法前面加上一个[Obsolete]。
    2. string[] arr={"a","b"}
    3. if $(ConfigurationName)==Release copy /y $(TargetPath) E:DevelopCommonDll
      if $(ConfigurationName)==Release copy /y $(TargetDir)LZL.XML E:DevelopCommonDl

    4. vs 事件命令不要加"",会报错;
    5. [Conditional("DEBUG")]
      internal static void Log(object obj)
      {}

    6. vs发布网站时,报cs0006错误,切换成Release编译一下
    7. C#交互窗口可以直接运行C#代码,打开方式:视图》其他窗口》C#交互
    8. <configSections>
      <sectionGroup name="common">
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" requirePermission="false" />
      </sectionGroup>
      <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
      <section name="SingleTagSectionTest" type="System.Configuration.SingleTagSectionHandler" />
      <section name="DictionarySectionTest" type="System.Configuration.DictionarySectionHandler" />
      <section name="NameValueSectionTest" type="System.Configuration.NameValueSectionHandler" />
      </configSections>

  • 相关阅读:
    HQL语句中类的别名语法以及作用?
    C#面向对象
    c#异步编程一
    c#接口
    c#Socket通信基本使用
    c#FTP基本使用
    c#XML的基本使用
    c#装箱与拆箱
    c#数组与集合
    c#中for与foreach的使用
  • 原文地址:https://www.cnblogs.com/lizhanglong/p/4281010.html
Copyright © 2011-2022 走看看