Skip to content

Instantly share code, notes, and snippets.

@surinoel
Created September 2, 2019 23:58
Show Gist options
  • Save surinoel/2a0b87a900fc1762b5c1f38cc5618e67 to your computer and use it in GitHub Desktop.
Save surinoel/2a0b87a900fc1762b5c1f38cc5618e67 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Example1
{
class Example
{
public static string data = "Example";
}
}
namespace Example2
{
class Example
{
public static string data = "Example";
}
}
namespace introCsharp
{
class Program
{
enum Color { BLACK, BLUE, RED, GREEN };
static void Main(string[] args)
{
Console.WriteLine("Hello world");
Console.WriteLine(Example1.Example.data);
Console.WriteLine(Example2.Example.data);
// Console.ReadLine(); // 사용자 엔터 대기
Color color = Color.BLACK;
if(color == Color.BLACK)
{
Console.WriteLine("검은색입니다");
}
else
{
Console.WriteLine("검은색이 아닙니다");
}
Console.WriteLine((int)Color.BLACK);
Console.WriteLine((int)Color.BLUE);
Console.WriteLine((int)Color.RED);
Console.WriteLine((int)Color.GREEN);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment