hiding public methods in the DropdownList.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lucky

    #1

    hiding public methods in the DropdownList.

    hi guys!

    again with some interesting Question.

    i've some public methods in class. i dont want to show this methods in
    the dropdown list while you are typing the code in .net IDE (it long
    story that why i dont need those methods in the list).
    i guess there are some arrtibutes those can prevent showing method in
    the popuped dropdown list but as i dont have much idea about this
    attributes, i need your expert help on this.

    please let me know if you know how can i do this or may be some other
    resource that can help me to find out the way of doing.

    thanks,
    Lucky

  • cbmeeks

    #2
    Re: hiding public methods in the DropdownList.

    uh....make then private instead of public??

    cbmeeks



    Lucky wrote:
    hi guys!
    >
    again with some interesting Question.
    >
    i've some public methods in class. i dont want to show this methods in
    the dropdown list while you are typing the code in .net IDE (it long
    story that why i dont need those methods in the list).
    i guess there are some arrtibutes those can prevent showing method in
    the popuped dropdown list but as i dont have much idea about this
    attributes, i need your expert help on this.
    >
    please let me know if you know how can i do this or may be some other
    resource that can help me to find out the way of doing.
    >
    thanks,
    Lucky

    Comment

    • Phill W.

      #3
      Re: hiding public methods in the DropdownList.

      Lucky wrote:
      i've some public methods in class. i dont want to show this methods in
      the dropdown list while you are typing the code in .net IDE (it long
      story that why i dont need those methods in the list).
      Yes, you can do this but - why would you have /Public/ methods that you
      don't want to show to people trying to /use/ your class?

      Regards,
      Phill W.

      Comment

      • Stoitcho Goutsev \(100\)

        #4
        Re: hiding public methods in the DropdownList.

        Phill,

        The attribute you are looking for is called EditorBrowsable Attribute


        --
        HTH
        Stoitcho Goutsev (100)

        "Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-kwrote in message
        news:eo5g0t$cd1 $3@south.jnrs.j a.net...
        Lucky wrote:
        >
        >i've some public methods in class. i dont want to show this methods in
        >the dropdown list while you are typing the code in .net IDE (it long
        >story that why i dont need those methods in the list).
        >
        Yes, you can do this but - why would you have /Public/ methods that you
        don't want to show to people trying to /use/ your class?
        >
        Regards,
        Phill W.

        Comment

        • Lucky

          #5
          Re: hiding public methods in the DropdownList.

          Hi Phill,
          i tried this,

          'VB
          <System.Compone ntModel.EditorB rowsable(System .ComponentModel .EditorBrowsabl eState.Never)>
          Public Sub myHiddenMethod( )

          End Sub


          // C#
          [System.Componen tModel.EditorBr owsable(System. ComponentModel. EditorBrowsable State.Never)]
          public void myHiddenMethod( )
          {
          }

          but unfortunately in c# this attribute fails to hide methods. i dont
          know why. i'm still workin on it.

          Lucky

          Stoitcho Goutsev (100) wrote:
          Phill,
          >
          The attribute you are looking for is called EditorBrowsable Attribute
          >
          >
          --
          HTH
          Stoitcho Goutsev (100)
          >
          "Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-kwrote in message
          news:eo5g0t$cd1 $3@south.jnrs.j a.net...
          Lucky wrote:
          i've some public methods in class. i dont want to show this methods in
          the dropdown list while you are typing the code in .net IDE (it long
          story that why i dont need those methods in the list).
          Yes, you can do this but - why would you have /Public/ methods that you
          don't want to show to people trying to /use/ your class?

          Regards,
          Phill W.

          Comment

          • RobinS

            #6
            Re: hiding public methods in the DropdownList.

            In the VB version below, either it's a typo, or you
            need an underscore after the to indicate continuation.

            Robin S.
            ------------------------------------
            "Lucky" <tushar.n.patel @gmail.comwrote in message
            news:1168529621 .340903.57690@p 59g2000hsd.goog legroups.com...
            Hi Phill,
            i tried this,
            >
            'VB
            <System.Compone ntModel.EditorB rowsable(System .ComponentModel .EditorBrowsabl eState.Never)>
            Public Sub myHiddenMethod( )
            >
            End Sub
            >
            >
            // C#
            [System.Componen tModel.EditorBr owsable(System. ComponentModel. EditorBrowsable State.Never)]
            public void myHiddenMethod( )
            {
            }
            >
            but unfortunately in c# this attribute fails to hide methods. i dont
            know why. i'm still workin on it.
            >
            Lucky
            >
            Stoitcho Goutsev (100) wrote:
            >Phill,
            >>
            >The attribute you are looking for is called EditorBrowsable Attribute
            >>
            >>
            >--
            >HTH
            >Stoitcho Goutsev (100)
            >>
            >"Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-kwrote in message
            >news:eo5g0t$cd 1$3@south.jnrs. ja.net...
            Lucky wrote:
            >
            >i've some public methods in class. i dont want to show this
            >methods in
            >the dropdown list while you are typing the code in .net IDE (it
            >long
            >story that why i dont need those methods in the list).
            >
            Yes, you can do this but - why would you have /Public/ methods that
            you
            don't want to show to people trying to /use/ your class?
            >
            Regards,
            Phill W.
            >

            Comment

            • Stoitcho Goutsev \(100\)

              #7
              Re: hiding public methods in the DropdownList.

              Hmm,

              I've used this attribute with c# and it worked perfectly for me as far as I
              remember.


              --
              Stoitcho Goutsev (100)

              "Lucky" <tushar.n.patel @gmail.comwrote in message
              news:1168529621 .340903.57690@p 59g2000hsd.goog legroups.com...
              Hi Phill,
              i tried this,
              >
              'VB
              <System.Compone ntModel.EditorB rowsable(System .ComponentModel .EditorBrowsabl eState.Never)>
              Public Sub myHiddenMethod( )
              >
              End Sub
              >
              >
              // C#
              [System.Componen tModel.EditorBr owsable(System. ComponentModel. EditorBrowsable State.Never)]
              public void myHiddenMethod( )
              {
              }
              >
              but unfortunately in c# this attribute fails to hide methods. i dont
              know why. i'm still workin on it.
              >
              Lucky
              >
              Stoitcho Goutsev (100) wrote:
              >Phill,
              >>
              >The attribute you are looking for is called EditorBrowsable Attribute
              >>
              >>
              >--
              >HTH
              >Stoitcho Goutsev (100)
              >>
              >"Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-kwrote in message
              >news:eo5g0t$cd 1$3@south.jnrs. ja.net...
              Lucky wrote:
              >
              >i've some public methods in class. i dont want to show this methods in
              >the dropdown list while you are typing the code in .net IDE (it long
              >story that why i dont need those methods in the list).
              >
              Yes, you can do this but - why would you have /Public/ methods that you
              don't want to show to people trying to /use/ your class?
              >
              Regards,
              Phill W.
              >

              Comment

              Working...