Programming Tutorial On The Way

free online programming resource on dotnet, csharp, web related topics

This article is similar to the previous one Finding Members in an Assembly. This time, use the same technique as previouly, but filter out all types except interfaces. This article also makes use of the GetMember method of the System.Type class. The name may contain a * wildcard character at the end of the string only. If the * wildcard character is the only character in the name parameter, all members are returned.

If you’d like to do a case-sensitive search, you can omit the BindingFlags.IgnoreCase flag from the call to Type.GetMember.
Read the rest of this entry »

Popularity: 2% [?]

The GetMember method of the System.Type class is useful for finding one or more methods within a type. This method returns an array of MemberInfo objects that describe any members that match the given parameters.

The * character may be used as a wildcard character only at the end of the name parameter string. In addition, it may be the only character in the name parameter; if this is so, all members are returned. No other wildcard characters, such as ?, are supported.
Read the rest of this entry »

Popularity: 2% [?]

Listing Exported Types

Obtaining the exported types in an assembly is useful when determining the public interface to that assembly. This ability can greatly aid in learning to use a new assembly or can aid the developer of that assembly in determining all access points to their assembly and seeing whether they are adequately secure from malicious code. To get these exported types, we use the GetExportedTypes method on the System.Reflection.Assembly type. The exported types consist of all of the types that are publicly accessible from outside of the assembly. A type may have public accessibility but not be accessible from outside of the assembly. Read the rest of this entry »

Popularity: 2% [?]

Listing Imported Assemblies

You need to determine each assembly imported by a particular assembly. This information can show you if this assembly is using one or more of your assemblies or if your assembly is using another specific assembly. Obtaining the imported types in an assembly is useful, greatly aid in learning to use a new assembly and also help determine dependencies between assemblies for shipping purposes. To obtain the imported assemblies of an assembly, you can use the GetReferencedAssemblies method of System.Reflection.Assembly. Read the rest of this entry »

Popularity: 2% [?]