C# FAQ: Is a Cplusplus abstract class like a CSharp interface

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
CSharp-Online.NET:FAQs
edit

Is a C++ abstract class like a C# interface?

No, a C# interface is not the same thing as a C++ abstract class. In C++, an abstract class cannot be instantiated; but, it can include data members and-or implementation code.

In contrast, a C# interface cannot contain data members and-or implementation code. A C# interface is little more than a collection of method signatures. Thus, a C# interface is more like a COM interface than a C++ abstract class.


See also



Personal tools