일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Tkinter
- Kotlin
- google apps script
- Google Excel
- string
- Google Spreadsheet
- matplotlib
- hive
- PostgreSQL
- array
- math
- c#
- Mac
- list
- Redshift
- PANDAS
- dataframe
- SQL
- Excel
- django
- Python
- Github
- numpy
- gas
- Apache
- GIT
- PySpark
- 파이썬
- Java
- Today
- Total
목록분류 전체보기 (832)
달나라 노트
C#에서 조건문은 다음과 같이 사용할 수 있습니다. if (condition1) { condition1 = True일 경우 실행될 부분 } else if (condition2) { condition2 = True일 경우 실행될 부분 } else if (condition3) { condition3 = True일 경우 실행될 부분 } else { 모든 condition이 False일 경우 실행될 부분 } else if 부분은 원하는 만큼 추가 가능합니다. else if 부분은 아예 없어도 됩니다. 실제 예시를 봅시다. using System; class MyProgram { static void Main() { int test1 = 5; if (test1
substring은 특정 위치부터 문자열을 잘라 return합니다. using System; class MyProgram { static void Main() { string test1 = "Apple"; string sub_test1 = test1.Substring(1); Console.WriteLine(sub_test1); string sub_test2 = test1.Substring(1, 3); Console.WriteLine(sub_test2); } } -- Result pple ppl string sub_test1 = test1.Substring(1); test1의 글자에서 index=1 위치부터 끝에 있는 부분만 reutrn합니다. string sub_test2 = test1.Substring..
C#에서도 문자열을 indexing하여 일부 문자를 추출할 수 있습니다. using System; class MyProgram { static void Main() { string test1 = "Apple"; Console.WriteLine(test1[0]); Console.WriteLine(test1[1]); Console.WriteLine(test1[2]); Console.WriteLine(test1[3]); Console.WriteLine(test1[4]); } } -- Result A p p l e 위처럼 어떤 문자열 오른쪽에 대괄호[]로 index번호를 부여합니다. 문자열에서 가장 첫 번째 문자의 index는 0입니다. 그 후로 1씩 증가합니다. using System; class MyProg..
C#에서도 Python의 format같은 기능을 제공합니다. 특정 위치의 문자열에 제가 원하는 문자열을 삽입하는 기능이죠. using System; class MyProgram { static void Main() { string test1 = "Apple"; string test2 = "Banana"; string test3 = "Watermelon"; string new_string = $"first={test1}, second={test2}, third={test3}"; Console.WriteLine(new_string); } } -- Result first=Apple, second=Banana, third=Watermelon interpolation을 사용하기 위해선 먼저 dollor sign인..