কম্পিউটার টিউটোরিয়াল

কেস-সেনসিটিভ HybridDictionary ক্লাস তৈরি C#-এ

কেস-সেনসিটিভ (বড়/ছোট হাতের অক্ষর আলাদা গণনা) HybridDictionary তৈরি করতে নিচের কোডটি ব্যবহার করা হয়:

উদাহরণ ১

using System; 
using System.Collections; 
using System.Collections.Specialized; 
public class Demo { 
    public static void Main() { 
        HybridDictionary dict = new HybridDictionary(false); 
        dict.Add("A", "AB"); 
        dict.Add("B", "BC"); 
        dict.Add("C", "DE"); 
        dict.Add("D", "de"); 
        Console.WriteLine("কী/ভ্যালু জোড়া..."); 
        foreach(DictionaryEntry de in dict) 
            Console.WriteLine("Key = " + de.Key + ", Value = " + de.Value); 
    } 
}

আউটপুট

এটি নিচের আউটপুটটি তৈরি করবে:

কী/ভ্যালু জোড়া... Key = A, Value = AB Key = B, Value = BC Key = C, Value = DE Key = D, Value = de

উদাহরণ ২

আরেকটি উদাহরণ দেখি (case-sensitive = true):

using System; 
using System.Collections; 
using System.Collections.Specialized; 
public class Demo { 
    public static void Main() { 
        HybridDictionary dict = new HybridDictionary(true); 
        dict.Add("A", "AB"); 
        dict.Add("B", "BC"); 
        dict.Add("C", "DE"); 
        dict.Add("D", "de"); 
        dict.Add("e", "FG"); 
        dict.Add("F", "gh"); 
        Console.WriteLine("কী/ভ্যালু জোড়া..."); 
        foreach(DictionaryEntry de in dict) 
            Console.WriteLine("Key = " + de.Key + ", Value = " + de.Value); 
    } 
}

আউটপুট

এটি নিচের আউটপুটটি তৈরি করবে:

কী/ভ্যালু জোড়া... Key = A, Value = AB Key = B, Value = BC Key = C, Value = DE Key = D, Value = de Key = e, Value = FG Key = F, Value = gh
  1. C# Console ক্লাস

  2. C#-এ ক্লাস (Class in C#)

  3. পাইথনে ডিকশনারি থেকে Pandas DataFrame তৈরি

  4. পাইথনে ক্লাস তৈরি করা