未在Intellisense中显示的继承的公共属性

时间:2009-01-07 21:41:57

标签: vb.net visual-studio-2008 oop inheritance intellisense

我在vb.net中继承了一个类,当我创建对象时,我只看到了intellisense中的一个继承的公共属性。解决这个问题的方法是什么?

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");

1 个答案:

答案 0 :(得分:1)

我建议打开Reflector并打开第三方dll。我猜这些属性将是内部的(我认为是vb.net中的朋友),这就是原因。