C# 문자열 비교 3::Compare() 1. 사용 패턴 가) public static int Compare(string strA, string strB); 나) public static int Compare(string strA, string strB, StirngComparison comparisonType); 다) public static int Compare(string strA, string strB, bool ignoreCase, CultureInfo culture); 라) public static int Compare(string strA, string strB, CultureInfo culture, ComparisonOptions options); 마) public static int Co..
문자열 비교 메서드 1: Equals() 1. 사용 패턴 가) public bool Equals(string value); 나) public override bool Equals(object obj); 다) public bool Equals(string value, StringComparsion comparisonType); 라) public static bool Equals(string a, string b, stringComparison comparsionType); value: 비교할 문자열 obj: 비교할 객체 comparisonType: StringComparison 열거형 자료타입의 한 멤버 유형 기본적으로 “문자열1.Equals(문자열2)” 형태를 취하여 문자열1과 문자열2를 비교하여 그 b..
“초보자를 위한 C# and Database 완벽가이드”를 독학하면서 공부한 내용의 복습을 겸하여 블로깅하였다. 책의 설명만으로는 이해가 되지 않는 부분은 구글링을 통해 보충하였다. 참고한 문서는 아래 목록을 남겼다. 기본적인 문자열 비교 C#에서 문자열 비교는 string 클래스와 비교연사자(==, !=)를 이용한다. namespace compare { class Program { static void Main(string[] args) { string str1 = "This a good map."; string str2 = "This "; str2 += "a good map."; // str2 문자열에 "a good map." 추가 string str3 = str2; Console.WriteLine(..
- Total
- Today
- Yesterday
- w3s
- 까마귀의 향연
- 서식
- 속성
- 스타일
- equals()
- compare()
- headings
- String
- Element
- c#
- testedit
- markdown
- HTML5
- tistoy. drafts 4
- html. w3s
- 인용
- tistory
- attribute
- marsedit
- 얼불노
- formatting
- STYLES
- html
- notpad
- 하
- compareTo()
- 마틴
- paragraphs
- HTML 5
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |