LoginSignup
24
23

More than 5 years have passed since last update.

Unity,C#の個人的命名規約キーワードメモ

Last updated at Posted at 2014-01-15
//こんな感じ
using UnityEngine;
using System.Collections;

//クラス 
public class Example : MonoBehaviour
{    

//関数
    void Start()
    {
//変数
        int i = 3;
//キーワード
        HelloClass hello = new HelloClass();

        print(i);
        hello.Say();
    }
}

public class HelloClass : MonoBehaviour
{
    public void Say()
    {
        print("Hello!");    
    }
}

命名規則

クラス

アッパーキャメル記法(CamelCase)

MonoBehaviour
WebCamTexture
Debug

関数

アッパーキャメル記法(CamelCase)

AddComponent();
OnMouseUp();
Start();

変数

ローワーキャメル記法(camelCase)

myNumber
deltaTime
int

キーワード

全て小文字

audio
abstract
var

C#のキーワード一覧

参照
キーワード(予約語)一覧 C# によるプログラミング入門
http://ufcpp.net/study/csharp/ap_reserved.html
C# のキーワード
http://msdn.microsoft.com/ja-jp/library/x53a06bb(v=vs.90).aspx

キーワード

abstract
event
new
struct
as
explicit
null
switch
base
extern
object
this
bool
false
operator
throw
break
finally
out
true
byte
fixed
override
try
case
float
params
typeof
catch
for
private
uint
char
foreach
protected
ulong
checked
goto
public
unchecked
class
if
readonly
unsafe
const
implicit
ref
ushort
continue
in
return
using
decimal
int
sbyte
virtual
default
interface
sealed
volatile
delegate
internal
short
void
do
is
sizeof
while
double
lock
stackalloc
else
long
static
enum
namespace
string

コンテキストキーワード

from
get
group
into
join
let
orderby
partial (型)
partial (メソッド)
select
set
value
var
where (ジェネリック型制約)
where (クエリ句)
yield

24
23
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
24
23