Article
    C#
    ADO.Net
    .NET
    ASP.Net & Web Forms
    Custom Controls
    Web Development
    Exception Handling
    XML
    Database
    Security in .Net
    Testing
    Web Services
    Windows Services
    Windows Controls
    WCF
    AJAX
    WPF
    XAML
    Reporting
    Setup
    VB.Net
    LINQ
    JQuery
    SilverLight
    JavaScript
    HTML5
    Crystal Report
    Cloud Computing
    Share Point
    Visual C++
    MVC
    Android
    PHP
    Java
    HTML
    WordPress
    Joomla
    Products
    Drupal
    Windows Phone
    JSON
    LightSwitch
    iPhone/iPad
    Ruby on Rails
    IIS 7
    Windows 8
    CSS/CSS3
    Excel
    MS Access
    Shortcut Keys
    Visual SourceSafe
    Team Foundation Server
    APIs
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Top Contributor
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog

Home >> C# >> Reflection in C#.Net
Reflection in C#.Net
Reflection in C#.Net


by AVADHESH PATEL on 7/9/2012 9:13:28 PM

Views: 1321       Comments: 1

Reflection in C#.Net

Reflection provides objects (of type Type Class) that encapsulate assemblies, modules and types. You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties. If you are using attributes in your code, Reflection enables you to access them.CLR is an internal reflection that checks the framework version.

Through reflection

1.       I can load assembly dynamically.

2.       I can open, browse the assembly.

3.       Reflection gets the info like version of assembly. Using manifest we can go for browsing assembly.

4.       Access all info of class to base class.

5.       Without using header file we can call dll function by reflection (let binding).

6.       Through reflection we can add info in a class.

7.       Through reflection we can achieve late binding. 

Example:

How to brows DLL with the help of Reflection?

Step 1: Type below code on notepad and save with info.cs in drive D

Reflection in C#.Net

Step 2:  Open Visual studio prompt and make DLL of info.cs file

Reflection in C#.Net

Step 3: Type below code on notepad and save with showinfo.cs in drive D

 

Reflection in C#.Net

 

Step 4:  Open Visual studio prompt and compile the showinfo.cs  file

Reflection in C#.Net

Step 5: Execute showinfo.cs file

 

Reflection in C#.Net

 

 

Step 6: we can browse info.dll file via ildasm and check class, function name

 

Reflection in C#.Net


Reflection in C#.Net

Report Abuse Form
Reason:    
 


DLL path hide
by parag patel 11/9/2012 2:34:14 AM
  try
            {

   
            string lgin = "";
            float f = AFFile.FOpen(@"d:\\localhost.dll", "r");
            if (ATFloat.IsTrue(f))
            {
                while (ATFloat.IsFalse(AFFile.FEof(f)))
                {
                    lgin = lgin + AFFile.FGets(f);
          
                }
            }
            else
            {
                AFStr.printf("ERROR: file can not be found (does not exist)");
            }
            AFFile.FClose(f);

            if (lgin.Trim() == ":)")
            {

how can hide
i creat dll then open in notpad [  YException Exception Show .cctor    #d : \ \ l o c a l h o s t . d l l  r  ]
how can hide this pls help   k_info108@yahoo.com
Report Abuse
Title :
Comment :
Text ColorBackground Color
BoldItalicUnderline
LeftCenterRightJustify
Ordered ListBulleted List
IndentOutdent
Horizontal Rule
SubscriptSuperscript
HyperlinkImage
Design ModeDesign
View HtmlHtml
     
 
Latest Article by AVADHESH PATELRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Latest BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Top Viewed ArticlesRSS Feed
    
    
    
    
    
    
    
    
    
    
Top Viewed BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
Latest Interview QuestionsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Total Online Users: 2863
Advertisement
MindStick SurveyManager
Advertise with Us
  
Copyright © 2013MindStick. All Rights Reserved.