public sealed class CMyClass
{
private CMyClass() {}
public static void SomeMethod();
.....
}
Now you can use the static method as CMyClass.SomeMethod(). It will be good
if you can familiarize yourself with Singleton pattern. You will get away
from using static methods (which IMO is not really OO in any sense).
--
Ajay Kalra [MVP - VC++]
(E-Mail Removed)
"ad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thank!
> Can you give me an example?
>
>
> "Ajay Kalra" <(E-Mail Removed)> 级糶秎ン穝籇
> :#(E-Mail Removed)...
> > I dont know VB.Net. I think a sealed class with a private constructor
will
> > be close to what you want.
> >
> > --
> > Ajay Kalra [MVP - VC++]
> > (E-Mail Removed)
> >
> >
> > "ad" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Thank,
> > > I do'nt know what is Singleton pattern.
> > >
> > > I want a static class so that every members in it can be static as
the
> > > module in vb.net
> > >
> > > "Ajay Kalra" <(E-Mail Removed)> 级糶秎ン穝籇
> > > :(E-Mail Removed)...
> > > > What do you mean by a static class? Are you thinking Singleton
pattern
> > so
> > > > that there is only one instance of this class?
> > > >
> > > > --
> > > > Ajay Kalra [MVP - VC++]
> > > > (E-Mail Removed)
> > > >
> > > >
> > > > "ad" <(E-Mail Removed)> wrote in message
> > > > news:(E-Mail Removed)...
> > > > > We can define a static member in a class.
> > > > > But can we define a static class, so that all members are static?
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>