C# 1
or 16 (Binary or Hex)
1:1
C# C# (Java, Python, Go )
(0101010 ).
(Variable) : (Value)
(Variable) : (Value) ( )
(Variable) : (Value) ( ) ;
(Variable) : (Value) ( ) ; = ;
(Variable) : (Value)
(Variable) : (Value) playerhealth = 15;
(Variable) : (Value) playerhealth = 15; playerhealth = playerhealth - 5;
(Variable) : (Value) int playerhealth = 15; playerhealth = playerhealth - 5;
(Variable) : (Value) int playerhealth = 15; playerhealth = playerhealth - 5; float playerhealth = 15f;
(Variable) : (Value) int playerhealth = 15; playerhealth = playerhealth - 5; float playerhealth = 15f; bool playerisalive = true;
(Variable) : (Value) int playerhealth = 15; playerhealth = playerhealth - 5; float playerhealth = 15f; bool playerisalive = true; string playername = Arthur
(Variable) : (Value) int playerhealth = 15; playerhealth = playerhealth - 5; float playerhealth = 15f; bool playerisalive = true; string playername = Arthur
(Variable) : (Value) int playerhealth = 15; playerhealth = playerhealth - 5; float playerhealth = 15f; bool playerisalive = true; string playername = Arthur
(Variable) : (Value) int playerhealth = 15; playerhealth = playerhealth - 5; float playerhealth = 15f; bool playerisalive = true; string playername = Arthur
(Function): // Explosion :
(Function): // Explosion : // 10 // 5
(Function): // Explosion : // 10 // 5 Car : Barrel : // Explosion : // Explosion : // 10 // 5 // 10 // 5
(Function): // Explosion : // // 10 // 5 Car : Barrel : // Explosion : // Explosion : // 10 // 5 // 10 // 5
(Function): void Explosion() { // // 10 // 5 } Car : Barrel : // Explosion : // Explosion : // 10 // 5 // 10 // 5
(Function): void Explosion() { // // 10 // 5 } Car : Barrel : Explosion(); Explosion();
(Function): void Explosion() { // // 10 // 5 } Car : Barrel : Explosion(); Explosion();
(Function): void Explosion() { // // damage // explosionforce } Car : Barrel : Explosion(); Explosion();
(Function): void Explosion(damage, explosionforce) { // // damage // explosionforce } Car : Barrel : Explosion(); Explosion();
(Function): void Explosion(float damage, float explosionforce) { // // damage // explosionforce } Car : Barrel : Explosion(); Explosion();
(Function): void Explosion(float damage, float explosionforce) { // // damage // explosionforce } Car : Barrel : Explosion(20,10); Explosion(10,5);
void GenerateRandomName() { string name = ; }
void GenerateRandomName() { string name = ; return name; }
string GenerateRandomName() { string name = ; return name; }
string GenerateRandomName() { string name = ; return name; } string somename = GeneratorRandomName();
( ) :
( ) :,
( ) :,
( ) :,
( ) :,
( ) :, (void),
( ) :, (void), ( ) { }
class Animal { float weight; string name; string sound;... }
이데아는모든사물의원인이자본질이다 - 플라톤
클래스는모든오브젝트의원인이자본질이다
클래스와오브젝트 Class and Object 객체란스스로존재할수있는단위 사람, 동물, 고양이, 개, 자동차등 작업관리자, 금융거래기록등
클래스는틀 오브젝트는틀로찍어낸실제물건 사전에있는물건의추상적인설명과 실제로존재하는물건의차이
이상의세계 현실의세계 클래스오브젝트 (= 인스턴스 ) 사전에실려있는 사과의정의 현실의사과 자동차의틀 찍어낸자동차들 class Player { = new Player();
이런뜻입니다 클래스는자동차의틀, 오브젝트는프레스기로찍어낸실제자동차들
마지막하나더, Call by Reference
변수는인스턴스의걸어다니는그림자일뿐.
C# 에서무엇이레퍼런스형? class 인모든것 예외 : int, float, string 등기본변수 Call By Value 로지정된일부예외들