Click here to Skip to main content
15,895,192 members
Home / Discussions / C#
   

C#

 
GeneralRe: Horizontal ScrollBar does not work in the TextBox control... anymore. Pin
Dave Pie19-Aug-11 9:01
Dave Pie19-Aug-11 9:01 
Questionhow to detect toolbar click in Internet explorer Pin
vikas_kohli8220-Jul-09 3:14
vikas_kohli8220-Jul-09 3:14 
QuestionWould it crash the normal functioning of the program? Pin
Member 246491120-Jul-09 3:10
Member 246491120-Jul-09 3:10 
AnswerRe: Would it crash the normal functioning of the program? Pin
DaveyM6920-Jul-09 3:34
professionalDaveyM6920-Jul-09 3:34 
AnswerRe: Would it crash the normal functioning of the program? Pin
Luc Pattyn20-Jul-09 4:01
sitebuilderLuc Pattyn20-Jul-09 4:01 
Questionhow can I merge images from two different pictureboxes into one picturebox? Pin
strife1920-Jul-09 2:51
strife1920-Jul-09 2:51 
AnswerRe: how can I merge images from two different pictureboxes into one picturebox? Pin
dan!sh 20-Jul-09 2:59
professional dan!sh 20-Jul-09 2:59 
GeneralRe: how can I merge images from two different pictureboxes into one picturebox? Pin
strife1920-Jul-09 3:35
strife1920-Jul-09 3:35 
GeneralRe: how can I merge images from two different pictureboxes into one picturebox? Pin
Member 1075676119-Apr-14 19:29
Member 1075676119-Apr-14 19:29 
QuestionUser control Pin
john563220-Jul-09 2:26
john563220-Jul-09 2:26 
AnswerRe: User control Pin
musefan20-Jul-09 2:30
musefan20-Jul-09 2:30 
QuestionBlocking inheritance methods Pin
bonzaiholding20-Jul-09 1:53
bonzaiholding20-Jul-09 1:53 
AnswerRe: Blocking inheritance methods Pin
stancrm20-Jul-09 2:00
stancrm20-Jul-09 2:00 
GeneralRe: Blocking inheritance methods Pin
bonzaiholding20-Jul-09 2:28
bonzaiholding20-Jul-09 2:28 
GeneralRe: Blocking inheritance methods Pin
stancrm20-Jul-09 2:46
stancrm20-Jul-09 2:46 
GeneralRe: Blocking inheritance methods Pin
DaveyM6920-Jul-09 3:08
professionalDaveyM6920-Jul-09 3:08 
GeneralRe: Blocking inheritance methods Pin
PIEBALDconsult20-Jul-09 6:35
mvePIEBALDconsult20-Jul-09 6:35 
GeneralRe: Blocking inheritance methods Pin
DaveyM6920-Jul-09 9:25
professionalDaveyM6920-Jul-09 9:25 
The best I can come up with is the code below. So long as the classes are in a seperate assembly to the code accessing them, then it will work, although it only hides it from intellisense and creates a compile error if there is an attempt to use the method. If they are in the same assembly as the accessing code then the method will be visible, though unuseable.

I'm not keen on it as it's not very OOP - if B derives from A then it should have everything that A has, but MS do it all the time, so who am I to question this method?
public class A
{
    public void Func1()
    {

    }

    public virtual void Func2()
    {

    }
}

public class B : A
{
    [EditorBrowsable(EditorBrowsableState.Never),
    Obsolete("This method is not useable in this class", true)]
    public new void Func1()
    {
        throw new InvalidOperationException("This method is not useable in this class");
    }
    public override void Func2()
    {

    }
}


Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus)

AnswerRe: Blocking inheritance methods [modified] Pin
PIEBALDconsult20-Jul-09 4:26
mvePIEBALDconsult20-Jul-09 4:26 
Questioncompressing bytes Pin
shekhar25839520-Jul-09 1:46
shekhar25839520-Jul-09 1:46 
AnswerRe: compressing bytes Pin
stancrm20-Jul-09 1:50
stancrm20-Jul-09 1:50 
GeneralRe: compressing bytes Pin
musefan20-Jul-09 2:15
musefan20-Jul-09 2:15 
QuestionMeasureString returning different heights for different types of text primitives Pin
Raghu56620-Jul-09 1:45
Raghu56620-Jul-09 1:45 
AnswerRe: MeasureString returning different heights for different types of text primitives Pin
Dave Kreskowiak20-Jul-09 4:30
mveDave Kreskowiak20-Jul-09 4:30 
GeneralRe: MeasureString returning different heights for different types of text primitives Pin
Raghu56621-Jul-09 2:43
Raghu56621-Jul-09 2:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.