Pregunta

He heredado una clase en vb.net y cuando creo el objeto, solo veo una de las propiedades públicas heredadas en intellisense. ¿Alguna solución a este problema?

print("Public Class CompanyMailMessage
    Inherits MailMessage 

    Private AdobeDisclaimer As String = "You will need Adobe Acrobat to read this file. If it is not installed on your computer go to http://www.adobe.com/support/downloads/main.html to download. Thank You"
    Private _Body As String
    Private _IncludeAdobeDisclaimer As Boolean = False


    ''' <summary>
    ''' Gets or sets the body of the message
    ''' </summary>
    ''' <returns>A System.String that contains the body content.</returns>
    Public Property Body() As String
        Get
            If _IncludeAdobeDisclaimer Then
                _Body = _Body + AdobeDisclaimer
            End If

            Return _Body

        End Get
        Set(ByVal value As String)
            _Body = value
        End Set
    End Property
    ''' <summary>
    ''' Gets or sets a value that determines if a message that states that Adobe Acrobat must be used to open the attached files is included in the body of the message 
    ''' </summary>
    ''' <value></value>
    ''' <returns>True if ;otherwise, false</returns>
    ''' <remarks></remarks>
    Public Property IncludeAdobeDisclaimer() As Boolean
        Get
            Return _IncludeAdobeDisclaimer
        End Get
        Set(ByVal value As Boolean)
            _IncludeAdobeDisclaimer = value
        End Set
    End Property
    ''' <summary>
    ''' Initializes an instance of the CompanyMailMessageclass
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub New()

    End Sub
    ''' <summary>
    ''' Initializes an instance of the CompanyMailMessageclass with plain text in the body
    ''' </summary>
    ''' <param name="from">The email address of the sender</param>  
    ''' <param name="fromName">The name of the sender</param>              
    ''' <param name="to"></param>
    ''' <param name="subject"></param>
    ''' <param name="body"></param>
    ''' <remarks></remarks>
    Public Sub New(from as String,fromName As String,[to] as String,subject As String,body As String)

        MyBase.FromAddress = New EmailAddress(from,fromName)
        MyBase.ToAddresses.Add([to])
        MyBase.Subject = subject
        _Body = body
        MyBase.Items.Add(New MessageContent(MimeType.MessageRfc822,body))   

    End Sub");
¿Fue útil?

Solución

Sugeriría abrir Reflector y abrir la DLL de terceros. Supongo que las propiedades serán internas (amigo en vb.net, creo) y esa es la razón.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top