关于C#的一些符号使用方法

最近在工作中进行游戏开发,在Xlua与C#的调用中,发现一些问题,这里记录一下,便于后期复习。

1、C#和lua关于"."与":"的区别使用,懒得写,直接传送:传送门

2、@,一般用来做转义使用,例,不加@ string fileName = "D://文本文件//text.txt"; 加@string fileName = @"D:/文本文件/text.txt";

      其次用于字符串换行,目前没有尝试过string sql="select * from A"+“left join B”+" ON A.ID=B.ID";------->

      string  <a href="mailto:sql=@"select">sql=@"select  * from A

     

      在标识符中加@可使用关键字,pg:
    

namespace @namespace
{
    class @class
    {
        public static void @static(int @int)
        {
              if (@int > 0)
              {
                   System.Console.WriteLine("Positive Integer");
              }
              elseif (@int == 0)
              {
                  System.Console.WriteLine("Zero");
              }
              else
              {
                  System.Console.WriteLine("Negative Integer");
              }
        }
    }
}


 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值