Introduction
You can split a class up into different
files with using partial keyword. Partial keyword is used when we want
to make the Class definition into different file within same namespace. Science
two same name class create in a namespace. A class can span multiple
files too, but need to use the partial keyword when you declare it.
Program
using System;
using System.Collections.Generic;
using System.Linq;
namespace twosameclass
{
partial class Program // class name program
{
public void function1()
{
Console.WriteLine("Function1 of partial Class");
}


Join the conversation! Your thoughts help the community grow.