Skip to content

Instantly share code, notes, and snippets.

Avatar

Nan Wang nanwang2016

View GitHub Profile
View Using Keyword in C# - Namespace.cs
using System;
using Greeting;
namespace Greeting
{
public class MorningGreet
{
public void GoodMorning()
{
Console.WriteLine($"Good Morning");
}
@nanwang2016
nanwang2016 / Namespace in C# Fully Qualified Name.cs
Last active Nov 11, 2020
Namespace in C# Fully Qualified Name
View Namespace in C# Fully Qualified Name.cs
using System;
namespace Greeting
{
public class MorningGreet
{
public void GoodMorning()
{
Console.WriteLine($"Good Morning");
}
}
View static constructor
using System;
namespace TestFile
{
class Program
{
static void Main(string[] args)
{
View static method in C#
using System;
namespace TestFile
{
class Program
{
static void Main(string[] args)
{
Vehicle.startTheVehichle();
View Static Variable in C#
using System;
namespace TestFile
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("The color of the vehicle is: " + Vehicle.Model_color);
View static keyword in C# class method
using System;
namespace TestFile
{
class Program
{
static void Main(string[] args)
{
var result = Calculator.Sum(5, 7);
Console.WriteLine("The sum of 5 and 7 is " + result);
View Dynamic Polymorphism
using System;
namespace TestFile
{
class Program
{
static void Main(string[] args)
{
var animal = new Animal();
var cat = new Cat();
View gist:22ee5e4603a113b6adb92fa6466b71dd
using System;
namespace TestFile
{
class Program
{
static void Main(string[] args)
{
int resultInt = PlusMethod(1, 2);
double resultDouble = PlusMethod(2.4, 4.4);
View Sealed Class in C#
using System;
namespace TestFile
{
class Program
{
static void Main(string[] args)
{
}
View Polymorphism in C# 01
using System;
namespace TestFile
{
class Program
{
static void Main(string[] args)
{
}