Hello! I'm new here, this is my first "shot" topic.
Im study'ng programming in vb, html & asp. But the VB-part is wery hard, maybe i can get some good advise from the people here:-)
Im Norwegian, and my english is not the best, but i'll try my best, and i'll hope you understand me.
I need a little help to understand and to code Global constants & Global variables. Altso casting.
To make to global constants i have this code. The constants name shoud be BR & CLR like you se below. The datatype is String & the value is after the =(equal-sign)
Is it right to put the declaration to Global constants on the top of the code?
When is Public, is it then Global?
CODE
Public Class frmMain
Public BR As String = vbCrLf
Public CLR As String = ""
To make the global variables i have this code:
Is that right, and what is the difference between variables & constants? In the code i cant see any difference. Both is Public ... As String/Integer.
Is Integer variable & String constant?
CODE
Public Min As Integer = 0
Public Max As Integer = 100
In the load-event of my code im trying to make the tbx(textbox).Text & lbl.Text to the same values that i declared in the first of the code, the constatants BR & CLR.
So, mye code is like this:
CODE
tbxMin.Text = Min
tbxMax.Text = Max
And...I have to use a casting-function to be sure that the variables treats like a string-types. How do i do that? I realy need some advise here...