Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

bobo jede

@bobo jede
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Hide an event in an inherited class
    B bobo jede

    Perhaps I understand what you mean, but this doesn't "disable" calling SelectedIndexChanged event. It seems that it is not possible to do, what I want and that it is not correct in OOP principles. Bobo

    C# help tutorial question

  • Hide an event in an inherited class
    B bobo jede

    J4amieC wrote:

    Yes, write your own control, rather than inheriting ComboBox.

    Yes, that can be a way :) but I want to use this control and it's rich functionality.

    J4amieC wrote:

    Quite simply, no it is not. Inheritance implies that the derived object inherits every public property/method/event from its parent.

    But I can do the same with methods, don't I ?! Bobo

    C# help tutorial question

  • Hide an event in an inherited class
    B bobo jede

    You mean Obsolete attribute? I've tried it, but it didn't help :( Thanx for your answer Bobo

    C# help tutorial question

  • Hide an event in an inherited class
    B bobo jede

    Hi, I have an interesting problem (interesting for me :)). I need to hide an event in an inherited class. Example: Base class: ComboBox Inherited class: MyCombo And I want the event SelectedIndexChanged to be "disabled" out of MyCombo class. So that it shloud be impossible to write: MyCombo mc = new MyCombo(); mc.SelectedIndexChanged += new EventHandler(mc_SelectedIndexChanged); I tried this: **private new** event EventHandler SelectedIndexChanged; but it doesn't work - it is still possible to use this event. Is there any way to do this? And is it correct to do it in OOP? Thanx, Bobo

    C# help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups