












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!













Classes and class relationships are defined using UML Class diagrams These classes must be implemented Any OOP language can be used Visual Basic C# Java C++
Classes are declared inside of a class block Syntactically this works the same way as a form Properties and methods appear inside of the class block More in a moment
In a UML diagram, an attribute or operation can be visible or hidden In C#, keywords called access modifiers define which classes and other assemblies can use a component Their meaning is the same as their meaning discussed so far
public members are globally accessible and available to other assemblies (components) Globally available within the component too Note that Intellisense technology will display exposed members Members of the .NET Framework class library are public for example
Remember that methods perform an action In C#, methods are nothing more than procedures These are the same procedures that you have used before
Create a method named Area public class CircleV { public double Area(double argRadius) { return Math.PI * radius * radius; } }
Create a constructor to increment an instance counter
public Circle() { CallCount++; }
By default, members are instance members One instance exists for each class instance Think of a TextBox. One instance of the Text property exists for each control instance static members belong to the type so one copy exists for all class instances Declare shared members with the static keyword
Shared members cannot operate on instance data Instance members can operate with shared data