P
prakash
Dear Friends
The following Code Works Well....
------------------------------------------------------------
Public Interface IHello
Sub SayHello()
End Interface
Public Class Hello
Implements IHello
Private Sub SayHello() Implements IHello.SayHello
MessageBox.Show("Say Hello On the Hello Class")
End Sub
End Class
Dim HelloObject As New Hello
'HelloObject.SayHello() -> Not Accessible
Dim IHelloObject As IHello
IHelloObject = CType(HelloObject, IHello)
IHelloObject.SayHello()
-------------------------------------------------------
This code would not compile...
public interface IHello
{
void SayHello();
}
public class Hello : IHello
{
private void SayHello()
{
MessageBox.Show("Say Hello On the Hello Class");
}
}
-----------------------------------------------------------
VB.NET allows the modifers friend,public,private for interface
implementars
C# allows only public...
Why this inconsistency ??
Regards
Prakash
The following Code Works Well....
------------------------------------------------------------
Public Interface IHello
Sub SayHello()
End Interface
Public Class Hello
Implements IHello
Private Sub SayHello() Implements IHello.SayHello
MessageBox.Show("Say Hello On the Hello Class")
End Sub
End Class
Dim HelloObject As New Hello
'HelloObject.SayHello() -> Not Accessible
Dim IHelloObject As IHello
IHelloObject = CType(HelloObject, IHello)
IHelloObject.SayHello()
-------------------------------------------------------
This code would not compile...
public interface IHello
{
void SayHello();
}
public class Hello : IHello
{
private void SayHello()
{
MessageBox.Show("Say Hello On the Hello Class");
}
}
-----------------------------------------------------------
VB.NET allows the modifers friend,public,private for interface
implementars
C# allows only public...
Why this inconsistency ??
Regards
Prakash