1 / 6

Visual Basic.NET – Expression Dan Operator

Visual Basic.NET – Expression Dan Operator. Rully Yulian MF MCAD,MCPD,MCT,MVP VB.NET Independent IT Trainer - Application Developer http://www.yulianmf.com rully@yulianmf.com. Overview. Expression Operator Operator Precedence Operator Overloading. Expression .

roy
Download Presentation

Visual Basic.NET – Expression Dan Operator

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visual Basic.NET – Expression DanOperator Rully Yulian MF MCAD,MCPD,MCT,MVP VB.NET Independent IT Trainer - Application Developer http://www.yulianmf.com rully@yulianmf.com

  2. Overview • Expression • Operator • Operator Precedence • Operator Overloading

  3. Expression • Kumpulan dari operand dan operator • Operand dapat berupa nilai literal, variabel, atau return value dari sebuah fungsi • Operator menspesifikasikan operasi yang dilakukan terhadap satu atau lebih operand

  4. Operator • Arithmetic • +, -, *, /, \, Mod • String Concatenation • &, + • Assignment • =, +=, -=, *=, /=, &=, \=, ^= • Comparison • =, <, >, <=, >=, <> • Object • Is, IsNot, TypeOf, AddressOf, GetType • Logical • And, AndAlso, Or, OrElse, Not

  5. Operator Precedence • Urutan operator yang di proses dalam sebuah expression • Gunakan tanda kurung () untuk menghindari kesalahan perhitungan • Urutan operator yang di proses : • ^ • - (Negasi) • *, / • \ (Pembagian Integer) • +, - • & (String Concatenation)

  6. Operator Overloading • Bekerja pada Reference Type • Two Objects Added? Multiplied? Compared? • Harus dideklarasikan dengan Shared keyword • Public Shared [otherModifiers] Operator operatorSymbol _ (ByVal operand1 As dataType[, ByVal operand2 As dataType]) _ As returnDataType ' ----- Code Statement End Operator

More Related