2010年9月29日 星期三

1.5.7 Function 的 local variable

使用函式:

    Console.WriteLine()



1.5.6 子範圍 (Sub scope)

使用函式;

    Console.WriteLine



  

1.5.5 在 if 下定義的變數

使用函式:

    if ... else

    Console.WriteLine





2010年9月28日 星期二

1.5.4 try catch 中的 Variable scope

使用函式:

    try ... catch

    Console.WriteLine()

Class :

    InvalidCastException





  

2010年9月27日 星期一

1.5.變數的有效範圍

1.5.0    如何新增 class


1.5.1    示範 scope rules 以及 instance variables


1.5.2    屏蔽範圍(block scope)


1.5.3    Variable block scope


1.5.4    try catch 中的 Variable scope


1.5.5    在 if 下定義的變數


1.5.6    子範圍 (Sub scope)


1.5.7    Function 的 local variable


1.5.8    Local variable shadows global variable with the same name


1.5.9    Module global variable

1.5.3 Variable block scope

 使用函數:

    Console.WriteLine()

    If .... then ....Else....End If

    For .... Next





1.5.2 屏蔽範圍(block scope)

使用函式:

    Console.WriteLine()

    For....Next

    If....Then....End If



1.5.1 示範 scope rules 以及 instance variables

使用函式:

    Console.WriteLine()





你也可以把 class1 裡面的 main() 搬過來這邊,只是方法A,B的呼叫就會改變了..


1.5.0 如何新增 class

這是介面的使用!!

    首先一如往常的開啟新專案,主控台..

    專案中選擇 加入類別(C)


    接下來下面的畫面就會跳出來,至於class的名稱自己定就可以了喔


    完成以後你就會發現旁邊的方案總管畫面多了- class1.vb ...就表示你在這個方案中可以呼叫class1了喔

2010年9月26日 星期日

1.4.輸出資料到輸出介面 Console Write




1.4.2    可變索引




1.4.6 用 Console.WriteLine 輸出不同型別的資料

使用函式:

    Console.WriteLine()



1.4.5 在 Console.WriteLine 中使用可變索引

使用函式:

    Console.WriteLin()



1.4.4 使用 Console.WriteLine 來連接不同的字串

使用函式:

     Console.WriteLine()



1.4.3 使用不同的資料型別輸出文字

使用函式:

    Console.Write()

    Console.WriteLine()



1.4.2 可變索引

使用函式:

    Console.WriteLine()



1.4.1 輸出字串到螢幕

使用函式:

    Console.WriteLine()



2010年9月25日 星期六

1.3.8 比對使用者輸入模式

使用函式:

    Console.Write()

    Console.ReadLine()

    Like





 

1.3.7 使用 While 來讀取輸入

使用函式:

     Console.WriteLine()

     While...End While

    Console.ReadLine()





1.3.6 將輸入字元字串轉換到數值

使用函數:

    Console.ReadLine()

    Console.WriteLine()

    val()






 

1.3 從輸入介面(鍵盤)讀取資料

1.3.1    讀取單一字元

1.3.2    讀取整行文字

1.3.3    從鍵盤讀取 string (字串)

1.3.4    讀取鍵盤的輸入

1.3.5    使用 Do ... Loop 來讀取輸入

1.3.6    將輸入字元字串轉換到數值

1.3.7    使用 While 來讀取輸入

1.3.8    比對使用者輸入模式

1.3.5 使用 Do ... Loop 來讀取輸入

使用函式:
    Console.WriteLine

    Console.ReadLine

    Do...Loop While






2010年9月24日 星期五

1.3.4 讀取鍵盤的輸入

使用函式:

    Console.WriteLine()

    Console.ReadLine()

1.3.3 從鍵盤讀取 string (字串)

使用函式:

    Console.ReadLine()

    Try.....Catch ex As Exception....End Try



1.3.2 讀取整行文字

使用函式:

    Console.ReadLine

    Console.WriteLine()


1.3.1 讀取單一字元

使用函式:

    Console.Write()

    Console.ReadKey.KeyChar

    Console.WriteLine()