473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How can i have multiple base classes.

hi all,

I would like to be able to create an umbrella class for all my main global
sections but I would still like to keep them all in separate file something
like the below but I keep getting an error saying you are not allowed
Multiple base classes.
/// <summary>

/// This is the umbrella Object for loading all the Global classes at once.

/// It should only ever be used for this task.

/// </summary>

public class myGlobal : GlobalVariables , Settings , ErrorHandler ,StopWatch

{
}

Does any one know a way of doing this.

Thanks

ink


Feb 27 '07 #1
15 28295
"iKiLL" <iK***@NotMyEmail.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
hi all,

I would like to be able to create an umbrella class for all my main global sections but I
would still like to keep them all in separate file something like the below but I keep
getting an error saying you are not allowed Multiple base classes.
/// <summary>

/// This is the umbrella Object for loading all the Global classes at once.

/// It should only ever be used for this task.

/// </summary>

public class myGlobal : GlobalVariables , Settings , ErrorHandler ,StopWatch

{
}

Does any one know a way of doing this.

Thanks

ink

..NET does not support Multiple Inheritance, so the answer is you can't derive from multiple
base classes.

Willy.

Feb 27 '07 #2
iKiLL wrote:
public class myGlobal : GlobalVariables , Settings , ErrorHandler
,StopWatch
{
}
..NET/C# does not support multiple inheritance. Anders Hejlsberg doesn't like
it :-)
Does any one know a way of doing this.
You should use "using" directives for the classes, you want to reference.

Ebbe
Feb 27 '07 #3
Thanks for your comments both of you,

Ebbe what do you mean by ("using" directives for the classes) is this a
simple work around.
i have found a complicated work around using Interfaces.

Thnaks,
ink


"Ebbe Kristensen" <eb**@ekologic.dkwrote in message
news:eL**************@TK2MSFTNGP05.phx.gbl...
iKiLL wrote:
>public class myGlobal : GlobalVariables , Settings , ErrorHandler
,StopWatch
{
}

.NET/C# does not support multiple inheritance. Anders Hejlsberg doesn't
like it :-)
>Does any one know a way of doing this.

You should use "using" directives for the classes, you want to reference.

Ebbe

Feb 27 '07 #4
"iKiLL" <iK***@NotMyEmail.comwrote in
news:#q**************@TK2MSFTNGP02.phx.gbl:
I would like to be able to create an umbrella class for all my main
global sections but I would still like to keep them all in separate
file something like the below but I keep getting an error saying you
are not allowed Multiple base classes.

/// <summary>

/// This is the umbrella Object for loading all the Global classes at
once.

/// It should only ever be used for this task.

/// </summary>

public class myGlobal : GlobalVariables , Settings , ErrorHandler
,StopWatch

{
}
Does any one know a way of doing this.
Can you have instance variables for your "global" classes in your
"umbrella" class?

Eg.
public class MyGlobal
{
private GlobalVariables globalVariables;
private Settings settings;
private ErrorHandler errorHandler;
...
}

And of course you set the instances as appropriate, and expose them as
appropriate...

/Peter
Feb 27 '07 #5
iKiLL wrote:
Ebbe what do you mean by ("using" directives for the classes) is this
a simple work around.
i have found a complicated work around using Interfaces.
I am tempted to ask why you are asking that question? Surely you do know
what the "#using" directive does, don't you?

For example, if you insist on using global variables (you shouldn't but
that's another discussion), you collect them in a class in a .cs file and
get access to them in other files through a "#using" directive.

Ebbe
Feb 27 '07 #6
iKiLL <iK***@NotMyEmail.comwrote:
I would like to be able to create an umbrella class for all my main global
sections but I would still like to keep them all in separate file something
like the below but I keep getting an error saying you are not allowed
Multiple base classes.
Indeed you're not. However, I would question your design anyway. Does
your class really represent something which *is* a StopWatch and *is* a
Settings, and *is* an ErrorHandler? Or does it just *have* or use those
things? It sounds to me much more likely that composition is more
appropriate than inheritance here. (I would also worry about any class
called GlobalVariables, btw.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 27 '07 #7


hi all,

i am have been developing in VB6 for over 6 years.

I am having a hard time coming to grips with the development environment of
OOP.

The hole concept of not being able to access stuff that i need when i need
it with out loading up a entire class is really bugging me.

So fare in fact it is the most annoying part of this whole learning curve.

i am just trying to make development less time consuming with out effecting
the over program.

i really am open to suggestions but so fare all i have had from anyone is
[Why don't you just create the class when you need it.]

Below are a few things that i would like in my Global variables

public static string APPPATH =
System.IO.Path.GetDirectoryName(System.Reflection. Assembly.GetExecutingAssembly().GetName().CodeBase );

public string APP_PATH = APPPATH;

public string LOCAL_DB_PATH = APPPATH + @"\DB\";

public string ERROR_LOG_PATH = APPPATH + @"\Log\";

public string DIALOG_TITLE = "Mitie Cleaning";

public Boolean LOG_ERROR = false;

Now this means that ever time i want to access one of my paths i have to
Write the code to create the class before i can us my Variable and it is the
same with everything else.

if someone has a better suggestion then [just do it the long way like
everyone else] i would love to hear it.

thanks

ink


"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP************************@msnews.microsoft.c om...
iKiLL <iK***@NotMyEmail.comwrote:
>I would like to be able to create an umbrella class for all my main
global
sections but I would still like to keep them all in separate file
something
like the below but I keep getting an error saying you are not allowed
Multiple base classes.

Indeed you're not. However, I would question your design anyway. Does
your class really represent something which *is* a StopWatch and *is* a
Settings, and *is* an ErrorHandler? Or does it just *have* or use those
things? It sounds to me much more likely that composition is more
appropriate than inheritance here. (I would also worry about any class
called GlobalVariables, btw.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

Feb 27 '07 #8
You might want to try

public class MySettings
{
private static MySettings m_MySettings = null;
private string m_Path;

private static MySettings GetInstance()
{
if(m_MySettings = null)
{
m_MySettings = new MySettings();
m_MySettings.m_Path =
System.IO.Path.GetDirectoryNameSystem.Reflection.A ssembly.GetExecutingAssembly().GetName().CodeBase) ;
}
return m_MySettings;
}

public static string GetLocalDbPath()
{
MySettings mySettings = MySettings.GetInstance();
return m_MySettings.m_Path + @"\DB\";
}

public static string GetErrorLogPath()
{
MySettings mySettings = MySettings.GetInstance();
return m_MySettings.m_Path + @"\Log\";
}
}

in your source code you can use

string errorFile = MySettings.GetErrorLogPath() + "error.log";

The contents of MySettings apply to your entire application. Does this
answer your question?

Hans.
"iKiLL" wrote:
>

hi all,

i am have been developing in VB6 for over 6 years.

I am having a hard time coming to grips with the development environment of
OOP.

The hole concept of not being able to access stuff that i need when i need
it with out loading up a entire class is really bugging me.

So fare in fact it is the most annoying part of this whole learning curve.

i am just trying to make development less time consuming with out effecting
the over program.

i really am open to suggestions but so fare all i have had from anyone is
[Why don't you just create the class when you need it.]

Below are a few things that i would like in my Global variables

public static string APPPATH =
System.IO.Path.GetDirectoryName(System.Reflection. Assembly.GetExecutingAssembly().GetName().CodeBase );

public string APP_PATH = APPPATH;

public string LOCAL_DB_PATH = APPPATH + @"\DB\";

public string ERROR_LOG_PATH = APPPATH + @"\Log\";

public string DIALOG_TITLE = "Mitie Cleaning";

public Boolean LOG_ERROR = false;

Now this means that ever time i want to access one of my paths i have to
Write the code to create the class before i can us my Variable and it is the
same with everything else.

if someone has a better suggestion then [just do it the long way like
everyone else] i would love to hear it.

thanks

ink


"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP************************@msnews.microsoft.c om...
iKiLL <iK***@NotMyEmail.comwrote:
I would like to be able to create an umbrella class for all my main
global
sections but I would still like to keep them all in separate file
something
like the below but I keep getting an error saying you are not allowed
Multiple base classes.
Indeed you're not. However, I would question your design anyway. Does
your class really represent something which *is* a StopWatch and *is* a
Settings, and *is* an ErrorHandler? Or does it just *have* or use those
things? It sounds to me much more likely that composition is more
appropriate than inheritance here. (I would also worry about any class
called GlobalVariables, btw.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


Feb 27 '07 #9
Thanks Hans,

This looks like exactly what i am after.

But i am sorry i am not sure i understand how it is working.

Is this a Singleton Design Pattern. i recognize the GetInstance() from
something i was reading earlier.

How is it that this is working with out having to write all the create
object code, And at what point is this loaded into memory and destroyed from
memory?

Thanks
ink

"Hans" <Ha**@discussions.microsoft.comwrote in message
news:B2**********************************@microsof t.com...
You might want to try

public class MySettings
{
private static MySettings m_MySettings = null;
private string m_Path;

private static MySettings GetInstance()
{
if(m_MySettings = null)
{
m_MySettings = new MySettings();
m_MySettings.m_Path =
System.IO.Path.GetDirectoryNameSystem.Reflection.A ssembly.GetExecutingAssembly().GetName().CodeBase) ;
}
return m_MySettings;
}

public static string GetLocalDbPath()
{
MySettings mySettings = MySettings.GetInstance();
return m_MySettings.m_Path + @"\DB\";
}

public static string GetErrorLogPath()
{
MySettings mySettings = MySettings.GetInstance();
return m_MySettings.m_Path + @"\Log\";
}
}

in your source code you can use

string errorFile = MySettings.GetErrorLogPath() + "error.log";

The contents of MySettings apply to your entire application. Does this
answer your question?

Hans.
"iKiLL" wrote:
>>

hi all,

i am have been developing in VB6 for over 6 years.

I am having a hard time coming to grips with the development environment
of
OOP.

The hole concept of not being able to access stuff that i need when i
need
it with out loading up a entire class is really bugging me.

So fare in fact it is the most annoying part of this whole learning
curve.

i am just trying to make development less time consuming with out
effecting
the over program.

i really am open to suggestions but so fare all i have had from anyone is
[Why don't you just create the class when you need it.]

Below are a few things that i would like in my Global variables

public static string APPPATH =
System.IO.Path.GetDirectoryName(System.Reflection .Assembly.GetExecutingAssembly().GetName().CodeBas e);

public string APP_PATH = APPPATH;

public string LOCAL_DB_PATH = APPPATH + @"\DB\";

public string ERROR_LOG_PATH = APPPATH + @"\Log\";

public string DIALOG_TITLE = "Mitie Cleaning";

public Boolean LOG_ERROR = false;

Now this means that ever time i want to access one of my paths i have to
Write the code to create the class before i can us my Variable and it is
the
same with everything else.

if someone has a better suggestion then [just do it the long way like
everyone else] i would love to hear it.

thanks

ink


"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP************************@msnews.microsoft. com...
iKiLL <iK***@NotMyEmail.comwrote:
I would like to be able to create an umbrella class for all my main
global
sections but I would still like to keep them all in separate file
something
like the below but I keep getting an error saying you are not allowed
Multiple base classes.

Indeed you're not. However, I would question your design anyway. Does
your class really represent something which *is* a StopWatch and *is* a
Settings, and *is* an ErrorHandler? Or does it just *have* or use those
things? It sounds to me much more likely that composition is more
appropriate than inheritance here. (I would also worry about any class
called GlobalVariables, btw.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too



Feb 27 '07 #10
iKiLL <iK***@NotMyEmail.comwrote:
i am have been developing in VB6 for over 6 years.

I am having a hard time coming to grips with the development environment of
OOP.

The hole concept of not being able to access stuff that i need when i need
it with out loading up a entire class is really bugging me.

So fare in fact it is the most annoying part of this whole learning curve.

i am just trying to make development less time consuming with out effecting
the over program.
That's not really the best way of going - if you try to shoehorn an OO
environment into your non-OO mindset, you're going to be fighting it
every step of the way.
i really am open to suggestions but so fare all i have had from anyone is
[Why don't you just create the class when you need it.]

Below are a few things that i would like in my Global variables

public static string APPPATH =
System.IO.Path.GetDirectoryName(System.Reflection. Assembly.GetExecutingAssembly().GetName().CodeBase );

public string APP_PATH = APPPATH;

public string LOCAL_DB_PATH = APPPATH + @"\DB\";

public string ERROR_LOG_PATH = APPPATH + @"\Log\";

public string DIALOG_TITLE = "Mitie Cleaning";

public Boolean LOG_ERROR = false;
Firstly, look into the .NET naming conventions - these should be things
like ApplicationPath (although look at Application.ExecutablePath for
an easier way of doing this), LocalDatabasePath, ErrorLogPath,
DialogTitle and LogError.
Now this means that ever time i want to access one of my paths i have to
Write the code to create the class before i can us my Variable and it is the
same with everything else.
No you don't. Either you could use the Singleton pattern, or just make
the above into static variables (or preferably properties).

It's well worth reading a book or tutorial on OO before going too much
further. I'm not saying that to be unkind - I just know how easy it is
to carry practices from one environment into another where they're not
appropriate.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 27 '07 #11


Ok i think i have figured it out

The object creates it self the first time any of its properties are called
and then tests the internal object each time to make sure it only loads
itself up once into memory.

And then I assume that it will remain in memory till the application shuts
down.

But how is the Properties exposed the very first time[string errorFile =
MySettings.GetErrorLogPath() + "error.log";], if the object is not in memory
yet.

Is this some sort of rule that is just allowed. or am i missing something.

Thanks,

ink



"iKiLL" <iK***@NotMyEmail.comwrote in message
news:OU**************@TK2MSFTNGP05.phx.gbl...
Thanks Hans,

This looks like exactly what i am after.

But i am sorry i am not sure i understand how it is working.

Is this a Singleton Design Pattern. i recognize the GetInstance() from
something i was reading earlier.

How is it that this is working with out having to write all the create
object code, And at what point is this loaded into memory and destroyed
from memory?

Thanks
ink

"Hans" <Ha**@discussions.microsoft.comwrote in message
news:B2**********************************@microsof t.com...
>You might want to try

public class MySettings
{
private static MySettings m_MySettings = null;
private string m_Path;

private static MySettings GetInstance()
{
if(m_MySettings = null)
{
m_MySettings = new MySettings();
m_MySettings.m_Path =
System.IO.Path.GetDirectoryNameSystem.Reflection. Assembly.GetExecutingAssembly().GetName().CodeBase );
}
return m_MySettings;
}

public static string GetLocalDbPath()
{
MySettings mySettings = MySettings.GetInstance();
return m_MySettings.m_Path + @"\DB\";
}

public static string GetErrorLogPath()
{
MySettings mySettings = MySettings.GetInstance();
return m_MySettings.m_Path + @"\Log\";
}
}

in your source code you can use

string errorFile = MySettings.GetErrorLogPath() + "error.log";

The contents of MySettings apply to your entire application. Does this
answer your question?

Hans.
"iKiLL" wrote:
>>>

hi all,

i am have been developing in VB6 for over 6 years.

I am having a hard time coming to grips with the development environment
of
OOP.

The hole concept of not being able to access stuff that i need when i
need
it with out loading up a entire class is really bugging me.

So fare in fact it is the most annoying part of this whole learning
curve.

i am just trying to make development less time consuming with out
effecting
the over program.

i really am open to suggestions but so fare all i have had from anyone
is
[Why don't you just create the class when you need it.]

Below are a few things that i would like in my Global variables

public static string APPPATH =
System.IO.Path.GetDirectoryName(System.Reflectio n.Assembly.GetExecutingAssembly().GetName().CodeBa se);

public string APP_PATH = APPPATH;

public string LOCAL_DB_PATH = APPPATH + @"\DB\";

public string ERROR_LOG_PATH = APPPATH + @"\Log\";

public string DIALOG_TITLE = "Mitie Cleaning";

public Boolean LOG_ERROR = false;

Now this means that ever time i want to access one of my paths i have to
Write the code to create the class before i can us my Variable and it is
the
same with everything else.

if someone has a better suggestion then [just do it the long way like
everyone else] i would love to hear it.

thanks

ink


"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP************************@msnews.microsoft .com...
iKiLL <iK***@NotMyEmail.comwrote:
I would like to be able to create an umbrella class for all my main
global
sections but I would still like to keep them all in separate file
something
like the below but I keep getting an error saying you are not allowed
Multiple base classes.

Indeed you're not. However, I would question your design anyway. Does
your class really represent something which *is* a StopWatch and *is*
a
Settings, and *is* an ErrorHandler? Or does it just *have* or use
those
things? It sounds to me much more likely that composition is more
appropriate than inheritance here. (I would also worry about any class
called GlobalVariables, btw.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


Feb 27 '07 #12
iKiLL wrote:
But i am sorry i am not sure i understand how it is working.

Is this a Singleton Design Pattern. i recognize the GetInstance() from
something i was reading earlier.
It is indeed. A singleton works as follows:

first, the class contains a class variable, i.e. a variable tied to the
class instead of to an instance of the class. This is the "private static
MySettings m_MySettings = null;" at the start of the class.

The only way to get the access to an instance of this class is by calling
the GetInstance() method. This method checks to see if an instance has been
created. If not, it creates one and stores a reference to it in the
'm_MySettings' variable and initialises the other variables in the object.
Whether or not a new instance is created, a reference to it is returned to
the caller, who can then access the public interfaces to it - and only
those. In this case there are a couple of GetXxxx methods whereas the actual
values are not accessible. This design ensures that you cannot accidentally
change the settings.

Using a singleton ensures that you always refer to the same object. Without
it you might end up with two different object of the same class and a bunch
of hard-to-find errors.
How is it that this is working with out having to write all the create
object code,
Hmm, seems that Hans forgot a:

private void MySettings() {};
And at what point is this loaded into memory and destroyed from memory?
It is loaded on first access to it. Unload is something you don't need to
think about, .NET does it for you when the object is no longer needed. This
is what they call garbage collection.

Ebbe
Feb 27 '07 #13
iKiLL wrote:
But how is the Properties exposed the very first time[string errorFile =
MySettings.GetErrorLogPath() + "error.log";], if the object is not in memory
yet.

Is this some sort of rule that is just allowed. or am i missing something.
They are static. That means that they are accessed through the class,
not through an instance of the class.

--
Göran Andersson
_____
http://www.guffa.com
Feb 27 '07 #14
Am Tue, 27 Feb 2007 11:09:45 -0000 schrieb Jon Skeet [C# MVP]:
>
Indeed you're not. However, I would question your design anyway. Does
your class really represent something which *is* a StopWatch and *is* a
Settings, and *is* an ErrorHandler? Or does it just *have* or use those
things? It sounds to me much more likely that composition is more
appropriate than inheritance here. (I would also worry about any class
called GlobalVariables, btw.)
I agree here, but pls look at the following:
I have derivations of TextBox, Combobox, Checkbox, Label, TreeView and some
more. They all implement the same additional stuff - connection to a member
of a business object. For each of the controls, this is about 100 lines of
code, of which 80-95% are the same for each control. Due to the lack of MI,
I can't factor it out.

It is simply annoying to have to write things like

//-----------------------------------------------------------------
// boBindName
//
[
Bindable (true)
, Category ("QFC")
, Description ("Feld/Property, an das gebunden werden soll")
]
public string boBindName
{
get { return mBoBindName; }
set { mBoBindName = value; }
}

over and over again and identical in all controls. This is stupid, and
exactly this is one of the things MI was invented for.

My 2 cents..
Paule

Feb 28 '07 #15
On Wed, 28 Feb 2007 08:05:47 +0800, Paul Werkowitz
<ne********@primaprogramm.dewrote:
[...]
It is simply annoying to have to write things like

//-----------------------------------------------------------------
// boBindName
//
[
Bindable (true)
, Category ("QFC")
, Description ("Feld/Property, an das gebunden werden soll")
]
public string boBindName
{
get { return mBoBindName; }
set { mBoBindName = value; }
}

over and over again and identical in all controls. This is stupid, and
exactly this is one of the things MI was invented for.
I agree that having multiple inheritance would help address that.
However, there are other solutions that don't involve copying and pasting
the interesting code over and over.

For one, you could instead implement a helper class that all of your
derived classes include and expose as a property. Then you only have to
add the member (field) to the derived classes, along with a simple
property to expose the member. The longer code just needs to be written
once. This is, of course, a lot more maintainable as well; if you have to
change the shared functionality, you can change it just once rather than
having to revisit several copies of a 100 line block of code.

A similar solution would be to declare an interface. Then rather than
exposing your added functionality as a property, it's simply an interface
that the derived classes expose. This works more like multiple
inheritance, without many of the problems of multiple inheritance.

That said, I have also found that often times when I find that the
language seems to be impeding my progress and preventing me from doing
something I want to do, then whatever I am trying to do turns out to be a
poor design decision in the first place. There's usually an alternate
method that is completely different from the approach I start out with,
and which works better in the given language. In many cases, it turns out
to be more efficient and more maintainable as well.

In addition, my experiences with multiple inheritance in C++ have led me
to feel that multiple inheritance has more drawbacks than it does
advantages. Code I've dealt with that has multiple inheritance invariably
is harder to work with, buggier, and often creates strange ambiguities
that are difficult (or at the very least, awkward) to resolve.

It may be that you are dealing with a rare case in which you truly need
multiple inheritance. However, I suspect that it's more likely that if
you simply approach the problem from a slightly different vantage, you may
find an alternate solution that works just fine and which fits better into
the .NET paradigm, and which does not require that you copy and paste your
code over and over. My experience has been that copied and pasted code is
one of the very worst transgressions a programmer can do. I've yet to run
into a situation where interesting code (that is, anything more
complicated that a declaration or reference or something like that)
actually does have to be copied and pasted.

Pete
Mar 1 '07 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Stuart Golodetz | last post by:
Hi, I've got a minor casting issue which I need to check about (marked // <--). I was trying to do a static_cast on it (which didn't work, though I'm not sure why this should be the case?) I...
6
by: Paul | last post by:
In real life situation, do we ever come across a situation where we would need two base objects in an object. A snippet is worth 1000 words (: so... class Base { }; class Derived1:public Base...
20
by: km | last post by:
Hi all, In the following code why am i not able to access class A's object attribute - 'a' ? I wishto extent class D with all the attributes of its base classes. how do i do that ? thanks in...
22
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete...
5
by: Scott | last post by:
Hi All, Am I correct in assuming that there is no way to have a base pointer to an object that uses multiple inheritance? For example, class A { /* ... */ }; class B { /* ... */ };
2
by: Heinz Ketchup | last post by:
Hello, I'm looking to bounce ideas off of anyone, since mainly the idea of using Multiple Virtual Inheritance seems rather nutty. I chalk it up to my lack of C++ Experience. Here is my...
3
by: Jess | last post by:
Hello, I've been reading Effective C++ about multiple inheritance, but I still have a few questions. Can someone give me some help please? First, it is said that if virtual inheritance is...
47
by: Larry Smith | last post by:
I just read a blurb in MSDN under the C++ "ref" keyword which states that: "Under the CLR object model, only public single inheritance is supported". Does this mean that no .NET class can ever...
13
by: stephenpas | last post by:
We are trying to monkey-patch a third-party library that mixes new and old-style classes with multiple inheritance. In so doing we have uncovered some unexpected behaviour: <quote> class Foo:...
2
by: Immortal Nephi | last post by:
You may have heard diamond shape. You create one base class. One base class has member functions and member variables. You create two derived classes. All member functions and member variables...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.