Extending Microsoft Dynamics NAV 2016 Cookbook by Alexander Drogin

Extending Microsoft Dynamics NAV 2016 Cookbook by Alexander Drogin

Author:Alexander Drogin [Drogin, Alexander]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2017-01-18T16:00:00+00:00


Understanding static classes and methods

All DotNet variables used in the previous recipe had to be instantiated before they could be used, which means that methods called on such variables are executed on a particular instance of that class. Static methods belong to the class itself and can be called without instantiating the variable.

The whole class can be declared as static. In this case, the class does not implement any constructor and all its methods have to be also static. An example of a static class is File--a .NET class encapsulating file operations.

A non-static class can implement both instance and static methods. RegEx is an example of a class that has both static and instance methods. RegEx is a .NET implementation of regular expressions.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.