C# Saved Program: placid-terrain



Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


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

namespace TheOnlineCompiler
{
    public enum Grades 
    { 
        F = 0, D = 1, C = 2, B = 3, A = 4
    };
    
    public class Grade
    {
        public Grades OwnGrade { get; set; }
        
        public Grade(Grades grade)
        {
            OwnGrade = grade;
        }
        
        public bool IsPassing()
        {
            return OwnGrade >= Grades.D;
        }
    }
    
    class Program 
    {
        static void Main() 
        {
            Grades g1 = Grades.C;
            Console.WriteLine(g1);
            Console.WriteLine(g1.IsPassing);
        }
    }
}
Execute