C#-片段:外侧代码

ylbtech-C#-片段:外侧代码
1.返回顶部
·#if
#if true

#endif
·#region
        #region MyRegion

        #endregion
·namespace
namespace MyNamespace
{

}
·class
class MyClass
{

}
·interface
interface IInterface
{

}
·struct
struct MyStruct
{

}
·enum
enum MyEnum
{

}
··
2.返回顶部
·do
do
{

} while (true);
·if
if (true)
{

}
·else
else
{

}
·while
while (true)
{

}
·
3.返回顶部
·for
for (int i = 0; i<length; i++)
{

}
·forr
for (int i = length - 1; i >= 0 ; i--)
{

}
·foreach
foreach (var item in collection)
{

}
·
4.返回顶部
·try
try 
{            
        
}
catch (global::System.Exception)
{

    throw;
}
·tryf
try 
{            
            
}
finally
{

}
·
5.返回顶部
·using
using(resource)
{

}
·
 
6.返回顶部
·checked
checked
{

}
·unchecked
unchecked
{

}
·lock
lock (this)

{

}
·unsafe
unsafe
{

}
·
 
warn 作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
原文地址:https://www.cnblogs.com/storebook/p/11833756.html