Results 1 to 2 of 2

Thread: Type of Parameter

  1. #1
    Geek_Guest
    Guest

    Type of Parameter

    I have created a VB class. There is a method A() which takes optional parameter. Now a C# class inherits this class and wants to call the method a having optional parameter. So what type of parameter should it pass to for the optional parameter to call this method

    Question asked by visitor Rohini


  2. #2
    Junior Member
    Join Date
    Jul 2006
    Answers
    22

    Re: Type of Parameter

    Hi,

    You should pass the normal parameter but what type u specified in that method

    Example:

    Public Class Class1
    Public Function A(Optional ByVal b As String = "")
    Return "a"
    End Function

    End Class

    here i am inheriting like

    class Class2:Class1
    {


    }
    Then u need pass parameter of type string,but here its not compulsary.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact