This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TestFile | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
namespace TestFile | |
{ | |
class Program | |
{ | |
//The text file's path is stored in 'filename' | |
static string filename = @"C:\Users\Nan\source\repos\Example.txt"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
namespace TestFile | |
{ | |
class Program | |
{ | |
//The text file's path is stored in 'filename' | |
static string filename = @"C:\Users\Nan\source\repos\Example.txt"; | |
static void Main(string[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TestFile | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.Write("This is Line 1"); | |
Console.Write("This is Line 2"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace TestFile | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//Only Defaul Constructor with parameters is valid, as Private Constructor is not allowed to create an instance. | |
Student UniStudent = new Student("Jack", "007"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TestFile | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//Both Static and Default constructors will invoke for first instance | |
Student UniStudent = new Student(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TestFile | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Student UniStudent = new Student("Jack", "007"); | |
Student NewUniStudent = new Student(UniStudent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TestFile | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Student UniStudent = new Student("Jack", "007"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TestFile | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Student UniStudent = new Student(); | |
UniStudent.Name = "Jack"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TestFile | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Student UniStudent = new Student(); |