C#
|
VB.net
|
using System;
partial class PC
{
public void Method1()
{
Console.WriteLine("I'm from m1");
}
}
|
Partial Class PC
Public Sub Method1()
Console.WriteLine("I'm from m1")
End Sub
End Class
|
partial class PC
{
public void Method2()
{
Console.WriteLine("I'm from m2");
}
}
|
Partial Class PC
Public Sub Method2()
Console.WriteLine("I'm from m2")
End Sub
End Class
|
class Program
{
private static void Main(string[] args)
{
PC ob = new PC();
ob.Method1();
ob.Method2();
Console.ReadKey();
}
}
|
Class Program
Private Shared Sub Main(args As String())
Dim ob As New PC()
ob.Method1()
ob.Method2()
Console.ReadKey()
End Sub
End Class
|
Output:
I'm from m1
I'm from m2
|