-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: millikan
Message 1 in Discussion


Hi All,

 

I am the guy who gave a lot of u guys out there dumps for going ahead with ur 
MCSD .NET Plans... Now please do me a favor.

I need the dumps for 070-228... SQL Server Admin. If any of u can give the same 
to me I would be highly gratefuly.

 

Regards,

Milliken Fernandes




From: [EMAIL PROTECTED]
To: [email protected]
Subject: Re: ReflectionTypeLoadException
Date: Wed, 5 Apr 2006 01:48:28 -0700


<META content="Microsoft SafeHTML" name=Generator>
<STYLE> .ExternalClass ThmFgColumnHeader, .ExternalClass A.FrameLink, 
ExternalClass A.HeaderLink, .ExternalClass A.FooterLink, .ExternalClass 
A.LgtCmd, .ExternalClass A.MSNLink {color:#FFFFFF;} .ExternalClass 
ThmFgTitleLightBk {color:#FF6600;} .ExternalClass ThmFgSmallLight 
{color:#ff0000;} .ExternalClass ThmFgNavLink, .ExternalClass A.NavLink, 
ExternalClass A.ChildLink:hover {color:#666699;} .ExternalClass 
ThmFgInactiveText, .ExternalClass A.SystemLink {color:#666666;} ExternalClass 
ThmFgFrameTitle {color:#FFFFCC;} .ExternalClass ThmFgTitleDarkBk, 
.ExternalClass A.NavLink:hover, .ExternalClass A.TitleLink {color:#CC6600;} 
.ExternalClass ThmFgMiscText, ExternalClass A.Cat, .ExternalClass A.SubCat 
{color:#336699;} ExternalClass ThmFgCommand, .ExternalClass A.Command, 
.ExternalClass A.LargeCommand, .ExternalClass A.MsgLink {color:#003366;} 
.ExternalClass ThmFgHeader {color:#333333;} .ExternalClass ThmFgStandard, 
ExternalClass A.SystemLink:hover, .ExternalClass A.SubLink, ExternalClass 
A.ChildLink, .ExternalClass A.StdLink, .ExternalClass SELECT.Standard 
{color:#000000;} .ExternalClass ThmFgDivider {color:#CCCCCC;} .ExternalClass 
ThmBgStandard {background-color:#FFFFFF;} .ExternalClass ThmBgUnknown1 
{background-color:#FF6600;} .ExternalClass ThmBgFraming 
{background-color:#666699;} .ExternalClass ThmBgUnknown2 
{background-color:#666666;} .ExternalClass ThmBgHighlightDark 
{background-color:#FFFFCC;} .ExternalClass ThmBgHighlightLight, ExternalClass 
#idToolbar, .ExternalClass #tbContents {background-color:#FFFFE8;} 
.ExternalClass ThmBgTitleDarkBk {background-color:#F1F1F1;} .ExternalClass 
ThmBgAlternate {background-color:#ECF1F6;} .ExternalClass ThmBgUnknown3 
{background-color:#CCCCFF;} .ExternalClass ThmBgDivider 
{background-color:#CCCCCC;} .ExternalClass ThmBgHeader 
{background-color:#9999CC;} .ExternalClass ThmBgLinks 
{background-color:#8696C9;} .ExternalClass ThmBgSharkBar 
{background-color:#8696C9;} .ExternalClass ThmBgGlobalNick 
{background-color:#9394A9;} .ExternalClass calfgndcolor {color:#E00505;} 
ExternalClass calbgndcolor {color:#E00505;} </STYLE>





New Message on MumbaiUserGroup



ReflectionTypeLoadException





Reply





 
Reply to Sender   Recommend 
Message 3 in Discussion 





From: Pankil 






Hi,<o:p></o:p>

 Please check following code.

I have 2 managed dlls. <o:p></o:p>

1. ABC.dll<o:p></o:p>

2. XYZ.dll<o:p></o:p>

<o:p> </o:p>

XYZ.dll has a refrence of ABC.dll, which is installed in GAC.<o:p></o:p>

<o:p> </o:p>

I want to retrieve properties, methods and fields of XYZ.dll at run 
time.<o:p></o:p>

<o:p> </o:p>

I am using reflection to achieve this ... but when I try to use 
oAssembly.GetTypes() method I am getting ReflectionTypeLoadException 
error.<o:p></o:p>

<o:p> </o:p>


Code<o:p></o:p>

<o:p> </o:p>

    Private Sub Reflect()<o:p></o:p>

        Dim oAssembly As [Assembly]<o:p></o:p>

        Dim oTypes() As Type<o:p></o:p>

        Dim i As Integer<o:p></o:p>

<o:p> </o:p>

        Try<o:p></o:p>

            oAssembly = 
System.Reflection.Assembly.LoadFrom(“c:\test\xyz.dll”)<o:p></o:p>

            oTypes = oAssembly.GetTypes ‘This line gives error<o:p></o:p>

        Catch fnf As FileNotFoundException<o:p></o:p>

            MessageBox.Show("Could not load Assembly: {0}", 
txtFile.Text)<o:p></o:p>

            Exit Sub<o:p></o:p>

        Catch tl As ReflectionTypeLoadException<o:p></o:p>

            MessageBox.Show("Error in loading types")<o:p></o:p>

            Exit Sub<o:p></o:p>

        Catch ex As Exception<o:p></o:p>

            MessageBox.Show("Error occured" + ex.Message)<o:p></o:p>

            Exit Sub<o:p></o:p>

        End Try<o:p></o:p>

<o:p> </o:p>

        For i = 0 To oTypes.Length - 1<o:p></o:p>

            Dim fields() As FieldInfo = oTypes(i).GetFields()<o:p></o:p>

            Dim f As FieldInfo<o:p></o:p>

            If fields Is Nothing Then<o:p></o:p>

<o:p> </o:p>

            Else<o:p></o:p>

                For Each f In fields<o:p></o:p>

                    'Get fields<o:p></o:p>

                Next<o:p></o:p>

            End If<o:p></o:p>

        Next<o:p></o:p>


    End Sub<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

With error message as follows...<o:p></o:p>

One or more of the types in the assembly unable to load.<o:p></o:p>

<o:p> </o:p>

I am wondering if this is the case ... how object browser is getting list of 
all types and methods and properties.<o:p></o:p>

 <o:p></o:p>

Is it possible to load types, methods and properties the way object browser 
displays?<o:p></o:p>

 <o:p></o:p>

Thanks,<o:p></o:p>

Pankil<o:p></o:p>
View other groups in this category. 









To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings. 

Need help? If you've forgotten your password, please go to Passport Member 
Services. 
For other questions or feedback, go to our Contact Us page. 

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list. 
Remove my e-mail address from MumbaiUserGroup. 
 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to