Marcin Krzyzanowski
11/8/2005 9:29:00 AM
Necmi Göcek napisa3(a):
> Hi Marcin Krzyzanowski.
> Thanks for your fast reply.
>> The point here is:
>> "A class can be declared static, indicating that it contains only static
>> members.
> Firts of all, static modifier for classes allows non-static members and
> non-static methods
First of all you point to C# documentation, however this is a common
part of every object oriented language.
>> It is not possible to create instances of a static class using
>> the new keyword."
> And static modifier for classes allows to create instance by using new
> keyword. SO what is the magic for STATIC modifier for classes.
it make it static, not instance orientend. Generally you create instance
of class and call methods of this object instance. With static
classess/methods you do not have instance, methods are called directly,
not sure about X++, but sometimes (C, Java) static with variables mean
that they keep value while program is working. There is no "this"
because there is no instance.
>
> Here is an example that compiled succesfully and run without a problem.
(...)
Yeap, this is how it work with X++
Regards.