473,326 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Terminology: module or class?

I'm new to C# and trying to get a handle on terminology.

In the below class, I declare variables that are intended to be visible to
all members of the class. Are these:

"Module-level variables"
"Class-level variables"
"Member-level variables"

Or should they be called "Member-level declarations"?

namespace MyNamespace
{
public class MenuData
{
#region Module Level variables (?)

private string strMenuItem;
private string strMenuType;
private decimal decUnitPrice;

#endregion

public MenuData(string MenuItem, string MenuType,
decimal UnitPrice, string PhotoFile,int MenuID)
{
strMenuItem = MenuItem;
strMenuType = MenuType;
decUnitPrice = UnitPrice;
...
[code omitted]
}
}
Nov 17 '05 #1
2 1152
I can only guess that you are trying to declare class level variables
that are
visible to all INSTANCES of a class. So called static variables are part
of the class
itself.

http://www.geocities.com/Jeff_Louie/OOP/oop4.htm

Regards,
Jeff

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #2
deko <de**@nospam.com> wrote:
I'm new to C# and trying to get a handle on terminology.

In the below class, I declare variables that are intended to be visible to
all members of the class. Are these:

"Module-level variables"
"Class-level variables"
"Member-level variables"


They're instance variables, according to the C# specification. If they
had the static modifier, they'd be static variables.

A module in .NET is part of an assembly - most assemblies have a single
module containing all the types in that assembly. It's possible,
however, to have a multi-module assembly. These are very rare - partly
because VS.NET doesn't support them (you have to create them from the
command line).

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: dody suria wijaya | last post by:
I found this problem when trying to split a module into two. Here's an example: ============== #Module a (a.py): from b import * class Main: pass ============== ==============
2
by: Reid Priedhorsky | last post by:
Dear group, I'd have a class defined in one module, which descends from another class defined in a different module. I'd like the superclass to be able to access objects defined in the first...
12
by: Ron Bullman | last post by:
Hi, I haven't been able to find proper (commonly agreed) names for the following kinds of methods. Class (static) methods: c1) returns value, doesn't modify the content of its argument(s) and...
3
by: Neil Zanella | last post by:
Hello, I would like to ask a question pertaining to some C# terminology. My reference book says that within a class, attributes are the same as fields. I would like to know what the standard...
10
by: Bonzol | last post by:
vb.net Hey there, could someone just tell me what the differnce is between classes and modules and when each one would be used compared to the other? Any help would be great Thanx in...
32
by: Matias Jansson | last post by:
I come from a background of Java and C# where it is common practise to have one class per file in the file/project structure. As I have understood it, it is more common practice to have many...
2
by: mirandacascade | last post by:
I am prompted to make these inquiries after seeing the following link to ctypes: http://docs.python.org/lib/module-ctypes.html in which ctypes is described as a foreign function library. ...
6
by: JonathanOrlev | last post by:
Hello everyone, I have a newbe question: In Access (2003) VBA, what is the difference between a Module and a Class Module in the VBA development environment? If I remember correctly, new...
97
by: xahlee | last post by:
I'd like to introduce a blog post by Stephen Wolfram, on the design process of Mathematica. In particular, he touches on the importance of naming of functions. • Ten Thousand Hours of Design...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.