Nov 27, 2007

memo of VB.Net 2005 I

Purpose
  (I can't remember very exactly)

Return an interger of weekday,while 1 to 7 stands for "Sun" to "Sat":
DatePart("w", year & "/" & month & "/" & day)

Add spaces:
Space(number)
  in case of lower ver.:
     Function Sps(ByVal n As Integer) As String
        Return String.Empty.PadLeft(n)
     End Function


Return multi value in function:
outside the function: Dim days(2) as ..
the end of function:  days(0)=..
                              days(1)=..
                              Return days

No comments: