"Tom" wrote:
[color=blue]
> Can I inherits private class in public class vb.net ?
>
> if can't , how can I do that ? such that I want to hidden some class in
> project
>
>
>[/color]
"Tom" <pclan@tomgroup .com> schrieb:[color=blue]
> Can I inherits private class in public class vb.net ?
>
> if can't , how can I do that ? such that I want to hidden some class in
> project[/color]
You cannot. If a class is 'Public', its base class must be public too.
What you can do is putting the code in a 'Friend' class and use this class
in your public class.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Before I write something wrong. What do yo mean with this?
[color=blue]
> What you can do is putting the code in a 'Friend' class and use this class
> in your public class.
>[/color]
"Cor Ligthert" <notmyfirstname @planet.nl> schrieb:[color=blue]
> Before I write something wrong. What do yo mean with this?
>[color=green]
>> What you can do is putting the code in a 'Friend' class and use this
>> class in your public class.[/color][/color]
\\\
Public Class Foo
Public Sub Bla()
Dim i As New ImplementationD etail()
i.Goo()
...
End Sub
End Class
Friend Class ImplementationD etail
Public Sub Goo()
...
End Sub
End Class
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Herfried,
[color=blue][color=green]
>> Before I write something wrong. What do yo mean with this?
>>[color=darkred]
>>> What you can do is putting the code in a 'Friend' class and use this
>>> class in your public class.[/color][/color]
>[/color]
Than I have nothing to say. It was the word "Use", however I was not sure
what you meant with that. Now it is for the OP as well clear that it is not
a use as inheriting however instancing.
Comment