GithubHelp home page GithubHelp logo

c-sharp's Introduction

C#

知らなかった機能:

  • goto文

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = 10; 
            int b = 20;
            Console.WriteLine("Max : {0}, Min : {1}, Size : {2}", uint.MaxValue, uint.MinValue, sizeof(uint));
            Console.WriteLine("{0} + {1} = {2}", a, b, a + b);
            Console.WriteLine("a < b = {0}", a < b);

            object obj = null;
            string str = "";
            Console.WriteLine("hello");

            if(a > b)
            {
                Console.WriteLine("a>b");
            }
            else if(a == b)
            {
                Console.WriteLine("a==b");
            }
            else
            {
                Console.WriteLine("a<b");
            }

            switch (a)
            {
                case 10:
                {
                    Console.WriteLine("10");
                    break;
                }
                case 20:
                {
                    Console.WriteLine("20");
                    continue;
                }
                default:
                {
                    Console.WriteLine("null");
                    break;
                }
            }

            while(true)
            {
                Console.WriteLine("a : {0}", a++);
                if (a >= 15)
                    break;
            }

            do
            {
                Console.WriteLine("a : {0}", a--);
            }
            while (a > 10);

            for(int i = 0; i < 5; i++)
            {
                Console.WriteLine("i : {0}", i);
            }
            test:

            int[] arr = {1, 2, 3, 4};
            foreach(int i in arr)
            {
                Console.WriteLine("arr : {0}",i);
            }
            
            goto test;
        }
    }
}

Regex

c-sharp's People

Contributors

kimth65 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.