One of the series of VB. NET articles -- using examples to talk about the application of Reflection

Source: Internet
Author: User

One of the series of VB. NET articles
Through examples, we will talk about the application of Reflection.
Note:
It should be said that this short article is not an in-depth analytical article, so I added the word "talking" before the title, hoping that for average readers, it gives you a more intuitive understanding of reflection.
-- 2005/05/23 in Dongguan
Here, we will briefly explain the concepts of reflection and reflection at the end.
1. Create an assembly file for testing.
First, you need to create a class library file (with the. dll extension after compilation). The name is assumed to be reflection_newtest.
The system will create a new class file class1 by default and convert it to the class person we use for testing.
The Code is as follows: (the class code is relatively simple and will not be explained here. For details, see the Class documentation .)
Public Class person
Public firstname As String
Public lastname As String
Dim m_age As Short
Dim m_emailaddress (4) As String
 
 
Public Sub New ()
MyBase. new ()
End Sub
 
 
Public Sub New (ByVal firstname As String, ByVal lastname As String)
Me. firstname = firstname
Me. lastname = lastname
End Sub
 
 
Public Property age () As Short
Get

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.