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

C#-এ System.Reflection.Module কী?


System.Reflection namespace-এ সেই ক্লাসগুলো রয়েছে যা আপনাকে অ্যাপ্লিকেশনের তথ্য পাওয়া এবং ডাইনামিক্যালি টাইপ, ভ্যালু, অবজেক্ট অ্যাপ্লিকেশনে যোগ করতে দেয়।

এতে একটি মডিউল কনস্ট্রাক্টর রয়েছে যা Module ক্লাসের নতুন ইনস্ট্যান্স ইনিশিয়ালাইজ করে। একটি মডিউল হল একটি পোর্টেবল এক্সিকিউটেবল ফাইল যাতে এক বা একাধিক ক্লাস এবং ইন্টারফেস থাকে।

C#-এ System.Reflection-এর উদাহরণ দেখি −

উদাহরণ

using System; using System.Reflection; [AttributeUsage(AttributeTargets.All)] public class HelpAttribute : System.Attribute {    public readonly string Url;    public string Topic // Topic is a named parameter {       get {          return topic;       }       set {          topic = value;       }    }    public HelpAttribute(string url) // url is a positional parameter {       this.Url = url;    }    private string topic; } [HelpAttribute("Information on the class MyClass")] class MyClass { } namespace AttributeAppl {    class Program {       static void Main(string[] args) {          System.Reflection.MemberInfo info = typeof(MyClass);          object[] attributes = info.GetCustomAttributes(true);          for (int i = 0; i < attributes.Length; i++) {             System.Console.WriteLine(attributes[i]);          }          Console.ReadKey();       }    } }

  1. 10.0.0.1 IP ঠিকানা কী?

  2. OS-এ Kernel কী? Kernel-এর প্রকারভেদ কী কী?

  3. উইন্ডোজ সিস্টেম এরর ৬১১৮ বোঝা: কারণ, লক্ষণ ও সমাধান

  4. Desktop Goose ম্যালওয়্যার ব্যাখ্যা: এটি কীভাবে আপনার সিস্টেমকে দুর্বল করে