// file1.cs
using System;
namespace vijay
{
internal class BC
{
internal void Method1()
{
Console.WriteLine("I'm from File 1 Base Class");
}
}
}
|
' file1.vb
Namespace vijay
Friend Class BC
Friend Sub Method1()
Console.WriteLine("I'm from File 1 Base Class")
End Sub
End Class
End Namespace
|
// file2.cs
using System;
namespace vijay
{
class DC : BC
{
internal void Method2()
{
Console.WriteLine("I'm from File 2 Derived Class");
}
}
class Program
{
static void Main()
{
DC ob = new DC();
ob.Method1();
ob.Method2();
Console.ReadKey();
}
}
}
|
' file2.vb
Namespace vijay
Class DC
Inherits BC
Friend Sub Method2()
Console.WriteLine("I'm from File 2 Derived Class")
End Sub
End Class
Class Program
Private Shared Sub Main()
Dim ob As New DC()
ob.Method1()
ob.Method2()
Console.ReadKey()
End Sub
End Class
End Namespace
|