Computer >> 컴퓨터 >  >> 프로그래밍 >> C#

C#

  1. C#에서 StringDictionary를 만드는 방법은 무엇입니까?

    C#에서 StringDictionary를 생성하기 위한 코드는 다음과 같습니다 - 예시 using System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main() {       StringDictionary strDict = new StringDictionary();       strDict.Add("A

  2. C#에서 StringBuilder의 길이를 찾는 방법은 무엇입니까?

    C#에서 StringBuilder의 길이를 찾으려면 코드는 다음과 같습니다. - 예 시스템 사용, System.Text 사용, public class Demo { public static void Main(String[] args) { StringBuilder strBuilder1 =new StringBuilder(Amy); StringBuilder strBuilder2 =새로운 StringBuilder(케이티); StringBuilder strBuilder3 =새로운 StringBuilder(); StringBuilder strB

  3. C#에서 StringBuilder의 MaxCapacity를 찾는 방법은 무엇입니까?

    StringBuilder의 MaxCapacity를 찾으려면 코드는 다음과 같습니다. - 예 시스템 사용, System.Text 사용, public class Demo { public static void Main(String[] args) { StringBuilder strBuilder1 =new StringBuilder(Amy); StringBuilder strBuilder2 =새로운 StringBuilder(케이티); StringBuilder strBuilder3 =새로운 StringBuilder(); StringBuilder

  4. C#의 OrderedDictionary 클래스

    OrderedDictionary 클래스는 키 또는 인덱스에서 액세스할 수 있는 키/값 쌍의 컬렉션을 나타냅니다. 다음은 OrderedDictionary 클래스의 속성입니다 - Sr.no 속성 및 설명 1 카운트 OrderedDictionary 컬렉션에 포함된 키/값 쌍의 수를 가져옵니다. 2 읽기 전용 OrderedDictionary 컬렉션이 읽기 전용인지 여부를 나타내는 값을 가져옵니다. 3 항목[Int32] 지정된 인덱스의 값을 가져오거나 설정합니다. 4 항목[객체] 지정된 키로 값을 가져오거나 설정

  5. C#에서 OrderedDictionary를 만드는 방법은 무엇입니까?

    C#에서 OrderedDictionary를 생성하기 위한 코드는 다음과 같습니다 - 예 using System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main() {       OrderedDictionary dict = new OrderedDictionary();       dict.Add("A&quo

  6. C#에서 StringBuilder를 만드는 방법은 무엇입니까?

    C#에서 StringBuilder를 생성하기 위한 코드는 다음과 같습니다 - 예 using System; using System.Text; public class Demo {    public static void Main(String[] args) {       StringBuilder strBuilder1 = new StringBuilder("Tim");       StringBuilder strBuilder2 = new StringBuil

  7. C#의 배열에 있는 총 요소 수

    배열에 있는 요소의 총 수를 얻으려면 코드는 다음과 같습니다. - 예시 using System; public class Demo {    public static void Main() {       string[] products = { "Electronics", "Accessories", "Clothing", "Toys", "Clothing", "Furniture" };  

  8. C#에서 StringBuilder의 용량을 찾는 방법

    C#에서 StringBuilder의 용량을 찾으려면 코드는 다음과 같습니다. - 예시 using System; using System.Text; public class Demo {    public static void Main(String[] args) {       StringBuilder strBuilder1 = new StringBuilder("Tim");       StringBuilder strBuilder2 = new StringB

  9. C#의 StringCollection 클래스

    StringCollection 클래스는 문자열 컬렉션을 나타냅니다. 다음은 StringCollection 클래스의 속성입니다 - Sr.no 속성 및 설명 1 카운트 OrderedDictionary 컬렉션에 포함된 키/값 쌍의 수를 가져옵니다. 2 읽기 전용 StringCollection이 읽기 전용인지 여부를 나타내는 값을 가져옵니다. 3 동기화됨 StringCollection에 대한 액세스가 동기화되었는지(스레드 안전) 여부를 나타내는 값을 가져옵니다. 4 항목[Int32] 지정된 인덱스에 있는 요소를

  10. 지정된 유니코드 문자가 C#에서 공백인지 여부를 나타냅니다.

    지정된 유니코드 문자가 공백인지 여부를 나타내기 위해 코드는 다음과 같습니다 - 예시 using System; public class Demo {    public static void Main() {       bool res;       char val = ' ';       Console.WriteLine("Value = "+val);       res = Char.IsW

  11. C#에서 Dictionary<TKey,TValue>에 지정된 키가 있는지 확인하십시오.

    Dictionary에 지정된 키가 있는지 확인하는 코드는 다음과 같습니다. - 예시 using System; using System.Collections.Generic; public class Demo {    public static void Main() {       Dictionary<string, string> dict =       new Dictionary<string, string>();       d

  12. 지정된 개체의 유형에 대한 핸들 가져오기 C#

    지정된 개체의 유형에 대한 핸들을 가져오려면 코드는 다음과 같습니다. - 예 using System; public class Demo {    public static void Main() {       Type type1 = typeof(System.Type);       RuntimeTypeHandle typeHandle = Type.GetTypeHandle(type1);       Type type = Type.GetTypeFro

  13. C#에서 현재 유형의 필드 가져오기

    현재 유형의 필드를 가져오려면 코드는 다음과 같습니다. - 예시 using System; using System.Reflection; public class Demo {    public static void Main() {       Type type = typeof(System.String);       FieldInfo [] fields = type.GetFields(BindingFlags.Static | BindingFlags.NonPublic); &nb

  14. C#에서 HashSet에 요소 추가

    HashSet에 요소를 추가하는 코드는 다음과 같습니다. - 예 using System; using System.Collections.Generic; public class Demo {    public static void Main(String[] args){       HashSet<string> set1 = new HashSet<string>();       set1.Add("A");     &nbs

  15. C#에서 현재 열거형 유형의 상수 값 배열 가져오기

    현재 열거형에서 상수 값의 배열을 얻으려면 코드는 다음과 같습니다 - 예 using System; public class Demo {    enum Vehicle {Car, Bus, Bike, Airplane}    public static void Main() {       try {          Type type = typeof(int);          string[] st

  16. C#의 ListDictionary에 지정된 키와 값을 추가합니다.

    지정된 키와 값을 ListDictionary에 추가하려면 코드는 다음과 같습니다. - 예시 using System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       ListDictionary dict = new ListDictionary();       dict.Add("1", &

  17. 현재 유형 C#의 특정 필드 가져오기

    C#에서 현재 유형의 특정 필드를 가져오려면 코드는 다음과 같습니다. - 예시 using System; using System.Reflection; public class Demo {    public static void Main() {    Type type = typeof(Subject);       try {          FieldInfo fieldInfo = type.GetField("SubName&quo

  18. C#의 Hashtable에 요소 추가

    해시 테이블에 요소를 추가하려면 코드는 다음과 같습니다 - 예 using System; using System.Collections; public class Demo {    public static void Main(){       Hashtable hash = new Hashtable(10);       hash.Add("1", "A");       hash.Add("2", &q

  19. C#에서 이 인스턴스의 해시 코드 가져오기

    이 인스턴스에 대한 해시 코드를 얻으려면 코드는 다음과 같습니다 - 예시 using System; public class Demo {    public static void Main() {       string[] arr = {"tom", "amit", "kevin", "katie"};       Type t1 = arr.GetType();       Type t

  20. OrderedDictionary 컬렉션에 C#의 특정 키가 포함되어 있는지 확인

    OrderedDictionary 컬렉션에 특정 키가 포함되어 있는지 확인하려면 코드는 다음과 같습니다. - 예시 using System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       OrderedDictionary dict = new OrderedDictionary();       dict.Ad

Total 2668 -컴퓨터  FirstPage PreviousPage NextPage LastPage CurrentPage:112/134  20-컴퓨터/Page Goto:1 106 107 108 109 110 111 112 113 114 115 116 117 118