News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;
  1. void Sample1(object o)
    {
      int i = (int)o;
    }   
    
  2. void Sample1(ValueType vt) 
    {
      int i = (int)vt; 
    }   
    
  3. enum E { Hello, World} void Sample1(System.Enum et) 
    {
      E e = (E) et; 
    }   
    
  4. class C {
      public int Value { get; set; }
    }
    void Sample1(C vt)
    {
      int i = vt.Value;
    } 
    
Answer: Answer is d
Further Reading:

Boxing is the process of converting a value type to the type object or to any interface type implemented by this value type. Unboxing extracts the value type from the object. Boxing is implicit; unboxing is explicit. In (d), it’s not followed the rules of unboxing. So, it’s not unboxing conversion. Useful resources, Boxing and Unboxing

comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;