반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- django
- GIT
- google apps script
- Google Excel
- list
- Java
- array
- Github
- Tkinter
- hive
- string
- matplotlib
- Apache
- dataframe
- Redshift
- Google Spreadsheet
- numpy
- Kotlin
- PySpark
- gas
- c#
- Python
- Mac
- PANDAS
- math
- SQL
- Excel
- 파이썬
- PostgreSQL
Archives
- Today
- Total
목록global variable (1)
달나라 노트
C# : ref, reference (Global 변수 참조하기, Global 변수 값 변경하기)
아래 코드를 봅시다. using System; class Sample2 { public static void Main() { int x = 1; Console.WriteLine(x); Functions f = new Functions(); f.change_number(x); Console.WriteLine(x); } } class Functions { public void change_number(int x) { x = x + 10; } } -- Result 1 1 int x = 1; Console.WriteLine(x); Main 내부에서 x 변수에 1이라는 값을 할당하고 있습니다. 그리고 x 값을 출력합니다. 여기선 당연히 1이 출력될겁니다. class Functions { public void ch..
C#/C#
2022. 5. 30. 20:01