Hmm, wow. You Interface is pointless in the example you have provided as you don't implement the interface in your MainObject class. (You do implement the properties defined in your interface, however, there isn't an interface enforcing you to implement them)
This is an invalid cast in any case.
What you should be doing is:
Public Class MainObject
Implements InterfaceObject1
...code
End Class
And then:
Dim objMainObject as new MainObject()
return objMainObject.Name
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========