일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- list
- Redshift
- Google Excel
- Google Spreadsheet
- Tkinter
- gas
- SQL
- Java
- Kotlin
- PANDAS
- math
- Mac
- 파이썬
- google apps script
- Github
- Python
- PostgreSQL
- matplotlib
- Apache
- GIT
- dataframe
- hive
- c#
- string
- django
- PySpark
- Excel
- array
- numpy
- Today
- Total
목록c# (87)
달나라 노트
C#은 객체지향 프로그래밍 언어이기때문에 내가 원하는 기능들이나 정보들을 모아서 class를 만들 수 있습니다. 이 class에 담는 정보 중에서 단순히 어떤 값이 아니라 어떤 기능을 하도록 만든 것을 method라고 합니다. 아래 예시를 봅시다. using System; class MyProgram { static void test_method() { Console.WriteLine("This is test method."); } static void Main() { test_method(); } } -- Result This is test method. 위 예시에서는 test_method라는 이름의 method를 생성하였습니다. 그리고 test_method가 선언된 위치를 잘 보시면 class MyP..
Array에 적용할 수 있는 함수 중 Max, Min, Sum이 있습니다. 바로 예시를 봅시다. using System; using System.Linq; class MyProgram { static void Main() { int[] test_arr = { 1, 2, 3, 4, 5 }; Console.WriteLine(test_arr.Max()); Console.WriteLine(test_arr.Min()); Console.WriteLine(test_arr.Sum()); Console.WriteLine(test_arr.Average()); } } -- Result 5 1 15 3 Max는 Array에서 최대값을 return합니다. Min는 Array에서 최소값을 return합니다. Sum은 Array에..
Sort method는 Array를 정렬해줍니다. using System; class MyProgram { static void Main() { string[] test_arr = { "Pineapple", "Banana", "Apple", "Grape" }; Array.Sort(test_arr); foreach (string t in test_arr) { Console.WriteLine(t); } } } -- Result Apple Banana Grape Pineapple test_arr은 무작위로 array 속 요소들이 존재합니다. 여기에 Array.Sort를 적용하면 test_arr 속 요소들이 알파벳 기준 오름차순으로 정렬됩니다. using System; class MyProgram { stati..