কম্পিউটার

C# এ System.Reflection.Module কি?


System.Reflection নামস্থানে এমন ক্লাস রয়েছে যা আপনাকে অ্যাপ্লিকেশন সম্পর্কে তথ্য পেতে এবং গতিশীলভাবে অ্যাপ্লিকেশনটিতে প্রকার, মান এবং বস্তু যোগ করতে দেয়৷

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

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 এ কার্নেল কি? কার্নেল কত প্রকার?

  3. সিস্টেম ত্রুটি 6118 কি?

  4. হংস ম্যালওয়্যার কি