IDEAS home Printed from https://ideas.repec.org/a/ddj/fseeai/y2017i3p26-32.html
   My bibliography  Save this article

Static Members of Classes in C#

Author

Listed:
  • Adrian LUPASC

    (Dunarea de Jos University of Galati, Romania)

Abstract

The C# language is object-oriented, which is why the declared member data must be part of a class. Thus, there is no possibility to declare certain variables that can be accessed from anywhere within the application, as it happens, for example, with global variables at the C language level. Making this work in C# is possible through static members of the class. Declaring a class implies defining some of its member data that later receive values when creating each object. A static member of the class can be interpreted as belonging only to the class, not to the objects subsequently created, which means that for the non-static data, there are as many children as there were objects created, while for the static ones there is only one copy, regardless of the number of created objects. In this regard, this paper presents the main aspects that characterize these abstract concepts of object oriented programming in general and C# language in particular, detailing how to develop an application that includes both static and non-static members. At the same time, particularities in the mirror for the two types of data, restrictions on use and potential limitations are presented.

Suggested Citation

  • Adrian LUPASC, 2017. "Static Members of Classes in C#," Economics and Applied Informatics, "Dunarea de Jos" University of Galati, Faculty of Economics and Business Administration, issue 3, pages 26-32.
  • Handle: RePEc:ddj:fseeai:y:2017:i:3:p:26-32
    as

    Download full text from publisher

    File URL: http://www.eia.feaa.ugal.ro/images/eia/2017_3/Lupasc.pdf
    Download Restriction: no
    ---><---

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:ddj:fseeai:y:2017:i:3:p:26-32. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Gianina Mihai (email available below). General contact details of provider: https://edirc.repec.org/data/fegalro.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.