Module.IsResource Method  
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value indicating whether the object is a resource.
public:
 virtual bool IsResource();public:
 bool IsResource();public virtual bool IsResource();public bool IsResource();abstract member IsResource : unit -> bool
override this.IsResource : unit -> boolmember this.IsResource : unit -> boolPublic Overridable Function IsResource () As BooleanPublic Function IsResource () As BooleanReturns
true if the object is a resource; otherwise, false.
Examples
The following example demonstrates a use of the IsResource method.
using System;
using System.Reflection;
namespace ReflectionModule_Examples
{
    class MyMainClass
    {
        static void Main()
        {
            Module[] moduleArray;
            
            moduleArray = typeof(MyMainClass).Assembly.GetModules(false);
            
            //In a simple project with only one module, the module at index
            // 0 will be the module containing this class.
            Module myModule = moduleArray[0];
            Console.WriteLine("myModule.IsResource() = {0}", myModule.IsResource());
        }
    }
}
Imports System.Reflection
Namespace ReflectionModule_Examples
    Class MyMainClass
        Shared Sub Main()
            Dim moduleArray() As [Module]
            moduleArray = GetType(MyMainClass).Assembly.GetModules(False)
            'In a simple project with only one module, the module at index
            ' 0 will be the module containing this class.
            Dim myModule As [Module] = moduleArray(0)
            Console.WriteLine("myModule.IsResource() = {0}", myModule.IsResource())
        End Sub
    End Class
End Namespace 'ReflectionModule_Examples