-
Notifications
You must be signed in to change notification settings - Fork 225
/
VB.NET.vb
550 lines (519 loc) · 9.22 KB
/
VB.NET.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
' Visual Basic Language Reference
' https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/
' Visual Basic language specification
' https://learn.microsoft.com/en-us/dotnet/visual-basic/reference/language-specification/
'! keywords =======================================================
' https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/
AddHandler AddressOf
Call
Public Protected Friend Private Shadows MustInherit NotInheritable Partial
Class Of
Inherits
Implements
End Class
Const
Shadows Overloads
Declare Ansi Unicode Auto Sub Lib Alias
Declare Function Lib Alias As
Shared Shadows Static ReadOnly
Delegate Sub Of As
Delegate Function Of As
Dim WithEvents As New ' With {}
Do
End
Continue Do
Exit Do
Do While
Loop
Do Until
Loop
Do
Loop While
Do
Loop Until
Loop
Enum As
End Enum
Erase
Error
Shared Shadows Event As Implements
Custom Event As Implements
AddHandler()
End AddHandler
RemoveHandler()
End RemoveHandler
RaiseEvent()
End RaiseEvent
End Event
For Each As In
Continue For
Exit For
Next
For As To Step
Next
Shared Shadows Async Iterator
Function Of As Implements Handles
Optional ByVal ByRef ParamArray
Exit Function
End Function
GoTo
Default Shared Shadows ReadOnly WriteOnly Iterator
If Then
ElseIf Then
Else
End If
If Then Else
Implements
Imports
Inherits
Interface Of
Inherits
Property
Function
Sub
Event
Interface
Class
Structure
End Interface
Mid()
Module
End Module
Namespace Global
End Namespace
On Error GoTo
On Error Resume Next
Public Overloads Shared Shadows Widening Narrowing
Operator As
Return
End Operator
Option Compare Binary Text
Option Explicit On Off
Option Infer On Off
Option Strict On Off
Property As Implements
Get
End Get
Set()
End Set
End Property
Property As Implements
RaiseEvent
ReDim Preserve
Rem
RemoveHandler AddressOf
Resume Next
Return
Select Case
Case Else
Case To
End Select
Stop
Structure Of
Implements
End Structure
Partial Sub
Exit Sub
End Sub
SyncLock
End SyncLock
Throw New
Try
Exit Try
Catch As When
Catch
Finally
End Try
Using
End Using
While
Continue While
Exit While
End While
With
End With
Yield
' https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/queries/
Aggregate As In Into
Distinct
From As In
Group By Into
Group Join As In On Equals And Equals Into
Let
Order By Ascending Descending
Select
Skip While
Take While
Where
' https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/
AddressOf And AndAlso Await
DirectCast
GetType() GetXMLNamespace()
Is If() IsFalse() IsNot IsTrue()
Like
Mod
NameOf() New Not
Or OrElse
TryCast() TypeOf Is IsNot
Xor
' https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/procedures/lambda-expressions
Function() And
Sub() And
' https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/modifiers/
Ansi Assembly Async Auto
ByRef ByVal
Default
Friend
In Iterator
Key
MustInherit MustOverride
Narrowing NotInheritable NotOverridable
Optional Out Overloads Overridable Overrides
ParamArray Partial Private Protected Friend Public
ReadOnly
Shadows Shared Static
Unicode
Widening WithEvents WriteOnly
' https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/keywords/
Me My MyBase MyClass
False True Nothing
'! types =======================================================
' https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/data-types/
Boolean Byte
Char
Date Decimal Double
Integer Long
Object
SByte Short Single String
UInteger ULong UShort
Variant
'! attributes =======================================================
' https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/concepts/attributes/
<Serializable()>
<AttributeUsage()>
<StructLayout()>
<DllImport()>
<MarshalAs()>
<Obsolete()>
<Conditional()>
' https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/attributes
<ComClass()>
<HideModuleName()>
<MyGroupCollection()>
<VBFixedArray()>
<VBFixedString()>
' https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/procedures/extension-methods
<Extension()>
'! directives =======================================================
' https://learn.microsoft.com/en-us/dotnet/visual-basic/reference/language-specification/preprocessing-directives
#If Then
#ElseIf Then
#Else
#End If
#Const
#ExternalChecksum
#ExternalSource
#End ExternalSource
#Region
#End Region
#Disable
#Enable
'! objects =======================================================
' https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualbasic?view=net-8.0
Collection {
Count
Item()
Add()
Clear()
Contains()
GetEnumerator()
Remove()
}
ControlChars {}
Conversion {}
DateAndTime {}
ErrObject {
Description
HelpContext
HelpFile
LastDllError
Number
Source
Clear()
GetException()
Raise()
}
Err {}
FileSystem {}
Financial {}
Information {}
Interaction {}
Strings {}
VBMath {}
' https://learn.microsoft.com/en-us/dotnet/api/system?view=net-8.0
Console {}
Math {
Abs()
Acos()
Asin()
Atan()
Atan2()
BigMul()
Ceiling()
Cos()
Cosh()
DivRem()
Exp()
Floor()
IEEERemainder()
Log()
Log10()
Max()
Min()
Pow()
Round()
Sign()
Sin()
Sinh()
Sqrt()
Tan()
Tanh()
Truncate()
Acosh()
Asinh()
Atanh()
BitDecrement()
BitIncrement()
Cbrt()
Clamp()
CopySign()
FusedMultiplyAdd()
ILogB()
Log2()
MaxMagnitude()
MinMagnitude()
ScaleB()
}
'! functions =======================================================
' https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/functions/
' Type Conversion Functions
CBool(expression)
CByte(expression)
CChar(expression)
CDate(expression)
CDbl(expression)
CDec(expression)
CInt(expression)
CLng(expression)
CObj(expression)
CSByte(expression)
CShort(expression)
CSng(expression)
CStr(expression)
CUInt(expression)
CULng(expression)
CUShort(expression)
CType()
' Conversion Class
CTypeDynamic()
ErrorToString()
Fix()
Hex()
Int()
Oct()
Str()
Val()
' DateAndTime Class
DateString
Now
TimeOfDay
Timer
TimeString
Today
DateAdd()
DateDiff()
DatePart()
DateSerial()
DateValue()
Day()
Hour()
Minute()
Month()
MonthName()
Second()
TimeSerial()
TimeValue()
Weekday()
WeekdayName()
Year()
' FileSystem Class
ChDir()
ChDrive()
CurDir()
Dir()
EOF()
FileAttr()
FileClose()
FileCopy()
FileDateTime()
FileGet()
FileGetObject()
FileLen()
FileOpen()
FilePut()
FilePutObject()
FileWidth()
FreeFile()
GetAttr()
Input()
InputString()
Kill()
LineInput()
Loc()
Lock()
LOF()
MkDir()
Print()
PrintLine()
Rename()
Reset()
RmDir()
Seek()
SetAttr()
Spc()
Tab()
Unlock()
Write()
WriteLine()
' Financial Class
DDB()
FV()
IPmt()
IRR()
MIRR()
NPer()
NPV()
Pmt()
PPmt()
PV()
Rate()
SLN()
SYD()
' Information Class
Erl()
IsArray()
IsDate()
IsDBNull()
IsError()
IsNothing()
IsNumeric()
IsReference()
LBound()
QBColor()
RGB()
SystemTypeName()
TypeName()
UBound()
VarType()
VbTypeName()
' Interaction Class
AppActivate()
Beep()
CallByName()
Choose()
Command()
CreateObject()
DeleteSetting()
Environ()
GetAllSettings()
GetObject()
GetSetting()
IIf()
InputBox()
MsgBox()
Partition()
SaveSetting()
Shell()
Switch()
' Strings Class
Asc()
AscW()
Chr()
ChrW()
Filter()
Format()
FormatCurrency()
FormatDateTime()
FormatNumber()
FormatPercent()
GetChar()
InStr()
InStrRev()
Join()
LCase()
Left()
Len()
LSet()
LTrim()
Mid()
Replace()
Right()
RSet()
RTrim()
Space()
Split()
StrComp()
StrConv()
StrDup()
StrReverse()
Trim()
UCase()
' VBMath Class
Randomize()
Rnd()
'! enumeration =======================================================
AppWinStyle
CallType CompareMethod
DateFormat DateInterval DueDate
FileAttribute FirstDayOfWeek FirstWeekOfYear
MsgBoxStyle MsgBoxResult
OpenAccess OpenMode OpenShare
TriState
VariantType VbStrConv
AttributeTargets LayoutKind
'! constants =======================================================
' https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/constants-and-enumerations
vbNullString vbObjectError
' https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.constants?view=net-8.0
' AppWinStyle
vbHide vbNormalFocus vbMinimizedFocus vbMaximizedFocus vbNormalNoFocus vbMinimizedNoFocus
' CallType
vbMethod vbGet vbLet vbSet
' CompareMethod
vbBinaryCompare vbTextCompare
' ControlChars
vbBack vbCr vbCrLf vbFormFeed vbLf vbNewLine vbNullChar vbTab vbVerticalTab
' DateFormat
vbGeneralDate vbLongDate vbShortDate vbLongTime vbShortTime
' FileAttribute
vbNormal vbReadOnly vbHidden vbSystem vbVolume vbDirectory vbArchive
' FirstDayOfWeek
vbUseSystemDayOfWeek vbSunday vbMonday vbTuesday vbWednesday vbThursday vbFriday vbSaturday
' FirstWeekOfYear
vbUseSystem vbFirstJan1 vbFirstFourDays vbFirstFullWeek
' MsgBoxStyle
vbOKOnly vbOKCancel vbAbortRetryIgnore vbYesNoCancel vbYesNo vbRetryCancel
vbCritical vbQuestion vbExclamation vbInformation
vbDefaultButton1 vbDefaultButton2 vbDefaultButton3
vbApplicationModal vbSystemModal
vbMsgBoxSetForeground vbMsgBoxHelp vbMsgBoxRight vbMsgBoxRtlReading
' MsgBoxResult
vbOK vbCancel vbAbort vbRetry vbIgnore vbYes vbNo
' TriState
vbUseDefault vbTrue vbFalse
' VariantType
vbEmpty vbNull vbInteger vbSingle vbDouble vbCurrency vbDate vbString vbObject
vbBoolean vbVariant vbDecimal vbByte vbChar vbLong vbUserDefinedType vbArray
' VbStrConv
vbUpperCase vbLowerCase vbProperCase vbWide vbNarrow vbKatakana vbHiragana
vbSimplifiedChinese vbTraditionalChinese vbLinguisticCasing