Dear All,
I get a code, which is given below:
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace DemoApplication
- {
- abstract class Tutorial
- {
- public virtual void Set()
- {
- }
- }
- class Guru99Tutorial:Tutorial
- {
- protected int TutorialID;
- protected string TutorialName;
- public void SetTutorial(int pID,string pName)
- {
- TutorialID=pID;
- TutorialName=pName;
- }
- public String GetTutorial()
- {
- return TutorialName;
- }
- static void Main(string[] args)
- {
- Guru99Tutorial pTutor=new Guru99Tutorial();
- pTutor.SetTutorial(1,".Net");
- Console.WriteLine(pTutor.GetTutorial());
- Console.ReadKey();
- }
- }
- }
In this example, there is no abstract method. and use only virtual method.
So we can use abstract class without abstract method? Please clear in brief.
Thanks and Regards
Ankit Shukla