변수의 Scope

using System; public class Scope { public int i=0; // Field 변수(전역) public static void Main() { { string str="나는 공산당이 싫어요!"; }//str은 여기에서 생명이 끝난다. { string str="나는 콩사탕이 싫어요!"; //str변수 중복 가능 } int i=100; // 지역변수(중복 가능) Console.WriteLine(i); } }

댓글

이 블로그의 인기 게시물

파이썬으로 Homomorphic Filtering 하기

파이썬으로 2D FFT/iFFT 하기: numpy 버전