利用者:Niboshi/C Sharpのキーワードハイライティング
表示
using System.Hoge;
using System.Collections.Generic;
namespace Test {
#if DEBUG
[Useless(Comment="Attribute test")]
public struct Hoge { }
#endif
public class NoWay {
readonly int _a;
const int CONST_VALUE = 63;
string[] Strings {
get { return new string[] { "a", "b", @"c" }; }
set { value.ToString(); }
}
internal event EventHandler Clicked {
add { throw new Exception(); }
remove { throw new Exception(null); }
}
private NoWay(int i1, int i2, string b, float f, double d, decimal deci, DateTime t) {
(new System.Math.Random().Next() as DateTime).ToString();
_a = i1;
}
static void DoSomething(string b)
{
B b1 = new Hoge();
int[] int_array = new int[] { 4, 4, 4, 4 };
MethodInvoker mi = new delegate() { throw new Exception(); }
int.Parse("wrong input");
mi.Invoke();
}
void Test<T>(T a) where T: new() {
Console.WriteLine(new T().ToString() + typeof(T).ToString());
}
}
}
/// ドキュメント形式の行コメント
// 通常の行コメント
/* キーワード一覧(http://msdn2.microsoft.com/ja-jp/library/x53a06bb(VS.80).aspx より)*/
abstract
as
base
bool
break
byte
case
catch
char
checked
class
const
continue
decimal
default
delegate
do
double
else
event
explicit
extern
FALSE
finally
fixed
float
for
foreach
goto
if
implicit
in
int
interface
internal
is
lock
long
namespace
new
null
object
operator
out
override
params
private
protected
public
readonly
ref
return
sbyte
sealed
short
sizeof
stackalloc
static
string
struct
switch
this
throw
TRUE
try
typeof
uint
ulong
unchecked
unsafe
ushort
using
virtual
volatile
void
while
/* コンテキスト・キーワード */
get
partial
set
value
where
yield