Click here to Skip to main content
15,913,487 members
Home / Discussions / C#
   

C#

 
QuestionHow to Encrypting Username and Password in C# Pin
Reeturaja25-Nov-05 6:35
Reeturaja25-Nov-05 6:35 
AnswerRe: How to Encrypting Username and Password in C# Pin
Stanciu Vlad25-Nov-05 6:45
Stanciu Vlad25-Nov-05 6:45 
QuestionControl visibility Problem in Inheriting WinForm! Pin
majidbhutta25-Nov-05 6:12
majidbhutta25-Nov-05 6:12 
AnswerRe: Control visibility Problem in Inheriting WinForm! Pin
Stanciu Vlad25-Nov-05 6:36
Stanciu Vlad25-Nov-05 6:36 
QuestionMultiple Inheritence problem Pin
rnvrnv25-Nov-05 5:10
rnvrnv25-Nov-05 5:10 
AnswerRe: Multiple Inheritence problem Pin
sjdevo3gsr25-Nov-05 5:30
sjdevo3gsr25-Nov-05 5:30 
GeneralRe: Multiple Inheritence problem Pin
rnvrnv25-Nov-05 5:49
rnvrnv25-Nov-05 5:49 
GeneralRe: Multiple Inheritence problem Pin
Colin Angus Mackay25-Nov-05 6:30
Colin Angus Mackay25-Nov-05 6:30 
.NET does not support multiple inheritance. You can only inherit from one base class. Although, you can inherit from multiple interfaces.

You might consider looking at refactoring MyAbstractClass so that can be used in something like the Strategy pattern.

public class MyClass : System.Windows.Forms.Form
{
    protected MyFormerlyAbstractClass functionality = new MyFormerlyAbstractClass();

    public void SomeMethod()
    {
        // Where you would have been able to call into a base method of MyAbstractClass
        // you can now do this:
        functionality.SomeMethodOnMyFormerlyAbstractClass();
    }
}


You could also create an interface to expose the methods that MyAbstractClass would have exposed then implement them in MyClass like this:

public void SomeInterfaceMethod()
{
    functionalty.SomeInterfaceMethod();
}


that way, external objects that interact with MyClass won't see any difference to how you would have wanted it anyway.

It isn't a perfect solution, but I think it would work for you.


My: Blog | Photos

"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious


QuestionPassing ref of a struct Pin
sjdevo3gsr25-Nov-05 4:55
sjdevo3gsr25-Nov-05 4:55 
AnswerRe: Passing ref of a struct Pin
leppie25-Nov-05 5:42
leppie25-Nov-05 5:42 
GeneralRe: Passing ref of a struct Pin
sjdevo3gsr25-Nov-05 8:08
sjdevo3gsr25-Nov-05 8:08 
QuestionC# Drawings.Image animation Pin
Ryotsuke25-Nov-05 3:41
Ryotsuke25-Nov-05 3:41 
AnswerRe: C# Drawings.Image animation Pin
Curtis Schlak.25-Nov-05 4:38
Curtis Schlak.25-Nov-05 4:38 
GeneralRe: C# Drawings.Image animation Pin
Ryotsuke25-Nov-05 10:23
Ryotsuke25-Nov-05 10:23 
GeneralRe: C# Drawings.Image animation Pin
Dave Kreskowiak25-Nov-05 10:31
mveDave Kreskowiak25-Nov-05 10:31 
GeneralRe: C# Drawings.Image animation Pin
Ryotsuke26-Nov-05 10:42
Ryotsuke26-Nov-05 10:42 
Questionhow to cancel a tab page change Pin
NikoTanghe25-Nov-05 3:22
NikoTanghe25-Nov-05 3:22 
AnswerRe: how to cancel a tab page change Pin
Curtis Schlak.25-Nov-05 4:34
Curtis Schlak.25-Nov-05 4:34 
Questiondrag and drop Pin
rakesh_nits25-Nov-05 2:32
rakesh_nits25-Nov-05 2:32 
Questionquestion about OLE Pin
KVEbek25-Nov-05 2:29
KVEbek25-Nov-05 2:29 
QuestionThreading Pin
1nsp1r3d25-Nov-05 2:26
1nsp1r3d25-Nov-05 2:26 
AnswerRe: Threading Pin
Curtis Schlak.25-Nov-05 4:44
Curtis Schlak.25-Nov-05 4:44 
QuestionArray Index Problem Pin
ytubis25-Nov-05 1:45
ytubis25-Nov-05 1:45 
AnswerRe: Array Index Problem Pin
the last free name25-Nov-05 2:16
the last free name25-Nov-05 2:16 
GeneralRe: Array Index Problem Pin
ytubis25-Nov-05 2:25
ytubis25-Nov-05 2:25 

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.