Tag: Class

Working with Namespaces in C#

Every application begins with a namespace in C# .NET that has the same name as the project. Of course, you can change the namespace to anything you like in order to maintain compatibility with other projects. For example we declared namespace Mycplus.CSharpBasics while taking an Overview of C#. We can write the whole application with in one namespace or we can declare multiple namespaces as needed in our project. The general syntax of declaring a namespace is

Read More

Constructors in C++

A constructor is a special method that is created when the object is created or defined. This particular method holds the same name as that of the object and it initializes the instance of the object whenever that object is created. The constructor also usually holds the initialization of the different declared member variables of its object.

Read More

A Guide to Advanced Exception Handling in C++ Programming

An exception usually signals an error. One of the major features in C++ is exception handling, which is a better way of thinking about and handling errors. Thought it doesn’t always indicate an error, it can also signal some particularly unusual even in your program that deserves special attention. This article also covers try, throw, and catch, the C++ keywords that support exception handling.

Read More