''' <summary>
''' EZ Calc Tutorial
''' JD McKinstry
''' First, it should be noted, as you become a
''' more experienced coder, you will find this tutorial
''' to contain very simple, non-standard practices. The
''' purpose of this is not to teach you to be company ready,
''' it is simply to teach some very basic examples of the
''' Basic Coding Language. Should you find this tutorial
''' beneath your skillset, then I advise you check out MicroSoft's
''' Developer Studio online and look up the Intermidiate Tutorials.
''' </summary>
Public Class frmMain
' This is simply the establishment of a Region
' Regions are useful in dividing up sections of code into similar catagories
' This is not extremely important for now, but helps to break down the compacted view,
' making it easier to see all the items in your code.
#Region " Vars/Properties "
''' <summary>
''' First things first, to do simple XML Comments like this one,
''' Simply place cursor 1 line above the method, property, or variable
''' you wish to document/comment on. Then simply type 3 single quotes;
''' such as the ones you see at the beggining of each line here.
''' In Visual Studio, this will automatically create a simple XML
''' Document/Comment layout!
''' This is useful later, when looking at your Object Library, as each
''' section in these comments is shown in an easy to read manner.
''' </summary>
''' <remarks>Notice, it doesn't add all featues, such as the 'example' feature seen below!</remarks>
''' <example>ezXML_Documentation = "This is a String"</example>
Private ezXML_Documentation As String
''' <summary>
''' Establish Enumerable for the 4 basic calculations.
''' This will later be used to determine which function
''' to use as your program "calculates"
''' </summary>
Enum calc
Add
Subtract
Multiply
Divide
End Enum
''' <summary>
''' This is a pre-.Net 4.0 standard for establishing a
''' "root variable" for later established properties.
''' This gives the Properties a variable to use for
''' interaction.
''' </summary>
Private _result As Double
Private _calcValue As calc
''' <summary>
''' These are both public properties which will be
''' used when 'doing the work' behind this calc program.
''' This first property is simply used to maintain the value
''' of our final result for each calcullation.
''' </summary>
Public Property result() As Double
Get
Return _result
End Get
Set(ByVal value As Double)
_result = value
End Set
End Property
''' <summary>
''' This second property will be used to store the present
''' value for the function being preformed. Remember our enum?
''' As you notice this property is an establishment of that enum,
''' meaning it can hold one value selected from that enum.
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Property calcValue() As calc
Get
Return _calcValue
End Get
Set(ByVal value As calc)
_calcValue = value
End Set
End Property
#End Region