Partial Methods in C# Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report C# contains a special method is known as a partial method, which contains declaration part in one partial class and definition part in another partial class or may contain both declaration and definition in the same partial class. Basically, partial methods exist in the partial class, or in the struct. A partial method may or may not contain implementation if a partial method doesn't contain an implementation in any part then the compiler will not create that method in the final class or driver class. A partial method is declared with the help of the partial keyword as shown below. Syntax: partial void method_name { // Code } Important Points: The declaration of the partial method must begin with partial modifier. The partial method may contain ref. The partial method does not contain out parameters. It is implicitly private method. It can be a static method. Partial method is generic. It can have only void return type. A partial method is created only in partial class or in partial struct. Example: We have a class named as Circle. The functionality of the Circle class is chopped into two different files named as circle1.cs and circle2.cs. These circle1.cs and circle2.cs files contain the partial class of the Circle class and partial method, i.e area. The circle1.cs file contains the declaration of the partial area() method and circle2.cs file contains the implementation of the area method as shown below: circle1.cs CSharp public partial class Circle { // This file only contains // declaration of partial method partial void area(int p); public void Display() { Console.WriteLine("Example of partial method"); } } circle2.cs CSharp public partial class Circle { public void newarea(int a) { area(int a); } // This is the definition of // partial method partial void area(int r) { int A = 3.14 * r * r; Console.WriteLine("Area is : {0}", A); } } When we execute the above code, then compiler combines circle1.cs and circle2.cs into a single file, i.e. circle as shown below. circle CSharp public class Circle { public void Display() { Console.WriteLine("Example of partial method"); } public void newarea(int a) { area(int a); } private void area(int r) { int A = 3.14 * r * r; Console.WriteLine("Area is : {0}", A); } } Comment More infoAdvertise with us Next Article Static keyword in C# A ankita_saini Follow Improve Article Tags : C# CSharp-OOP Similar Reads C# | Method Parameters Methods in C# are generally the block of codes or statements in a program which gives the user the ability to reuse the same code which ultimately saves the excessive use of memory, acts as a time saver and more importantly, it provides better readability of the code. So you can say a method is a co 7 min read LINQ | Method Syntax In LINQ, Method Syntax is used to call the extension methods of the Enumerable or Queryable static classes. It is also known as Method Extension Syntax or Fluent. However, the compiler always converts the query syntax in method syntax at compile time. It can invoke the standard query operator like S 2 min read Static keyword in C# static is a modifier in C# which is applicable for the following: ClassesVariablesMethodsConstructorIt is also applicable to properties, event, and operators. To create a static member(class, variable, methods, constructor), precede its declaration with the keyword static. When a member is declared 4 min read C# | Int32.ToString Method | Set - 1 Int32.ToString Method is used to converts the numeric value of the current Int32 instance to its equivalent string representation. There are 4 methods in the overload list of this method as follows:Here, we will discuss the first two methods. ToString(IFormatProvider) Method This method is used to c 2 min read C# | Int16.ToString Method | Set - 1 Int16.ToString Method is used to convert the numeric value of the current instance to its equivalent string representation. There are 4 methods in the overload list of this method as follows: ToString(IFormatProvider) Method ToString(String, IFormatProvider) Method ToString() Method ToString(String) 2 min read C# | Int32.ToString Method | Set - 2 Int32.ToString Method is used to convert the numeric value of the current instance to its equivalent string representation. There are 4 methods in the overload list of this method as follows: ToString(IFormatProvider) Method ToString(String, IFormatProvider) Method ToString() Method ToString(String) 2 min read Like