본문 바로가기

C#/수업 내용

수업 3 - 2 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { static void Main(string[] args) { ConsoleKeyInfo info = Console.ReadKey(); Console.WriteLine("info.Key : {0}", info.Key); Console.WriteLine("info.KeyChar {0}", info.KeyChar); int number = Convert.ToInt32(info.KeyChar); Console.WriteLine("ASCII.. 더보기
수업 3 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { static void Main(string[] args) { Console.Write("종족을 입력하세요 "); String race; race = Console.ReadLine(); Console.Write("시야를 입력하세요 "); String sight; sight = Console.ReadLine(); int sightnum = Convert.ToInt32(sight); Console.WriteLine("Race : {0}".. 더보기
수업 2 - 5 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { enum State { Air, Ground } class Program { static void Main(string[] args) { String race = "Viking"; int gas = 75; float sight = 39.9f; bool isFly = true; State eState = State.Air; Console.WriteLine("race: {0}", race); Console.WriteLine("Gas: {0}", gas); Cons.. 더보기
수업 2 - 4 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { enum State { Idle, Move, Attack, Die } class Program { static void Main(string[] args) { String race = "Protoss"; int minerals = 100; float time = 39.9f; bool isAttack = true; State eState = State.Attack; Console.WriteLine("race: {0}", race); Console.WriteLin.. 더보기
수업 2 - 3 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { enum State { LiftOff, UnLiftOff } class Program { static void Main(string[] args) { String race = "Terran"; int hp = 550; float armor = 1.1f; bool isLiftOff = true; State eState = State.LiftOff; Console.WriteLine("race: {0}", race); Console.WriteLine("hit poi.. 더보기
수업 2 - 2 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { enum State { Cloacked, UnCloacked } class Program { static void Main(string[] args) { State eState = State.UnCloacked; String race = "Terran"; int sight = 7; float speed = 6.67f; string hotKey = "W"; bool isCloaked = false; Console.WriteLine("race: {0}", race.. 더보기