Skip to content

Commit b7706ca

Browse files
Create Student.cs
1 parent 9f9a88f commit b7706ca

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Interfaces/Student.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
3+
namespace Interfaces
4+
{
5+
public class Student : User, MeTalking //Student Inherits From User and Implements MeTalking
6+
{
7+
static void Wr_L(object o)=>Console.WriteLine(o);//Includes a new line char
8+
9+
static void Wr_i(object m)=>Console.Write(m);//Includes a new line char
10+
11+
//Creating the custom constructor for Student that is read only
12+
//To invoke I put a colon
13+
public Student(string FN, string LN): base (FN,LN)
14+
{
15+
16+
}
17+
public int MakeSth{get; set;}
18+
19+
public override void SomeThingToTheConsole()
20+
{
21+
Wr_L("Howdy Howdy y'all I just overrode the User meth and by I, I am the Student: "+TheFullName);
22+
// If you place () The member `Cust_Constructor.Student.TheFullName' cannot be used as method or delegate
23+
//If you do not it says object reference is required to access non-static member Student.TheFullName'
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)