জয়েন লগইন

সি#

🌈সি# কি?

📋সি# হলো নির্দিষ্ট নিয়ম মেনে কোড লেখা পদ্ধতি।

⚒️সি# নির্দিষ্ট নিয়ম মেনে কোড লেখা ব্যবহৃত হয়।

তালিকা স্ট্রাকচার তৈরি করার উদাহরণ।

csharp

using System;
namespace MyApplication {
  class Program {
    static void Main(string[] args) {

    var fruits = new List<string> {"আপেল", "আঙ্গুর", "কমলা", "কলা"};

    foreach (var fruit in fruits) {
      Console.WriteLine(fruit);
    }

    }
  }
}

কী ও ভ্যালু জোড়া আকারে তৈরি করার উদাহরণ।

csharp

using System;
namespace MyApplication {
  class Program {
    static void Main(string[] args) {

    var info = new Dictionary<string, string> {
      ["নাম"] = "মোঃ আরিফ",
      ["দেশ"] = "বাংলাদেশ"
    };

    foreach (var item in info) {
      Console.WriteLine($"{item.Key} => {item.Value}");
    }

    }
  }
}

নেস্টেড স্ট্রাকচার তৈরি করার উদাহরণ।

csharp

using System;
namespace MyApplication {
  class Program {
    static void Main(string[] args) {

    var user = new Dictionary<string, object> {
      ["নাম"] = "মোঃ আরিফ",
      ["তথ্য"] = new Dictionary<string, string> {
        ["স্বপ্ন"] = "সফটওয়্যার ইঞ্জিনিয়ার",
        ["দেশ"] = "বাংলাদেশ"
      }
    };

    Console.WriteLine(user);

    }
  }
}

বহুমাত্রিক ডেটা স্ট্রাকচার তৈরি করার উদাহরণ।

csharp

using System;
namespace MyApplication {
  class Program {
    static void Main(string[] args) {

    var users = new List<List<string>>
    {
      new List<string> { "10", "তানিম", "বাংলাদেশ" },
      new List<string> { "11", "জোহান", "নেদারল্যান্ড" },
      new List<string> { "12", "হামিদ", "আফগানিস্তান" },
      new List<string> { "13", "সাকিব", "বাংলাদেশ" }
    };

    Console.WriteLine(users);

    }
  }
}

সি# কন্টেন্ট এর অন্তর্ভুক্ত লিংক সমূহ

আরও জানতে লিঙ্ক গুলোতে ভিজিট করুন

বুলিয়ান কাস্টিং comments কন্ডিশন ডেটা অ্যাক্সেস datarenders datastructures ডেটা টাইপ datetimes dictionaries ডিরেক্টরি ত্রুটি এক্সেপশন ফাইল সিস্টেম ফাংশন keywords lists লুপ গণিত অবজেক্ট ওরিয়েন্টেড প্রোগ্রামিং অপারেটর outputs রেজেক্স স্ট্রিং variables