Creating a new class

Menu > Project > Add Class

In the new .cs file add the following:

The namespace can be a distinct name, or for classes that are part of a main ap you can just use the ap’s namespace name.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

//----- NOTES -----
//
//USING THIS CLASS IN A PROJECT:-
/*
//USING NAMESPACES
	using OurLibraries;
//IN YOUR DECLARATIONS:
	private MyClass MyClass1;
//IN YOUR CONSTRUCTOR
	MyClass1 = new MyClass();
//START USING
	MyClass1.#();
*/

namespace OurLibraries
{
	class MyClass
	{
		//--------------------------
		//----- PUBLIC DEFINES -----
		//--------------------------
		//public 

		//---------------------------
		//----- PRIVATE DEFINES -----
		//---------------------------
		//private 

		//--------------------------
		//----- PUBLIC OBJECTS -----
		//--------------------------
		//public 
	
		//---------------------------
		//----- PRIVATE OBJECTS -----
		//---------------------------
		//private 

		
		//*********************************
		//*********************************
		//********** CONSTRUCTOR **********
		//*********************************
		//*********************************
		public MyClass()
		{
			
		}


	}
}

 

Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *