1 / 9

Visual Basic.NET-Basic

Visual Basic.NET-Basic. Rully Yulian MF MCAD,MCPD,MCT,MVP VB.NET Independent IT Trainer - Application Developer http://www.yulianmf.com rully@yulianmf.com. Overview. Struktur Program Visual Basic.NET Kompilasi Main Procedure Variable And Scope Konstanta. Struktur Program Visual Basic.

zaria
Télécharger la présentation

Visual Basic.NET-Basic

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-Basic Rully Yulian MF MCAD,MCPD,MCT,MVP VB.NET Independent IT Trainer - Application Developer http://www.yulianmf.com rully@yulianmf.com

  2. Overview • Struktur Program Visual Basic.NET • Kompilasi • Main Procedure • Variable And Scope • Konstanta

  3. Struktur Program Visual Basic • Option (Strict, Explicit, Infer, Compare) • Note : Option Infer hanya ada di VB 9.0 • Imports • Namespace - Class, Module, Structure, Interface • Class - Sub, Function, Property, Field, Event

  4. Kompilasi • Compiler terpisah dengan IDE Visual Studio.NET • Auto Compiled dengan Visual Studio.NET • Manual Compilation dengan Vbc.exe (Visual Basic Compiler) • Vbc.exe terdapat di dalam .NET Framework SDK

  5. Opsi Kompilasi • Build configurations • Debug – provides debug information • Release – optimizes code and executable size • Build options • Build – only builds changed projects • Rebuild – rebuilds project regardless of changes

  6. Main Procedure • Entry Point • Sub Main, Function Main As Integer • Sub Main(ByVal args() As String) • Function Main (ByVal args() As String) As Integer • Aplikasi Console harus memiliki Main Procedure • Aplikasi Desktop (.exe) generate Main Procedure secara otomatis oleh compiler. • Class Library (.dll) tidak membutuhkan Main Procedure.

  7. Variabel & Comment • Tempat penyimpanan data sementara di memori • Dideklarasikan dengan perintah Dim (Dimension) • Single Declaration : • Dim strNama As String • Multiple Declaration : • Dim intUmur, intJumlah As Integer • Dim intUmur As Integer, strNama As String • Komentar menggunakan tanda kutip tunggal : • ‘Komentar di Visual Basic tidak di proses sebagai code

  8. Variable Scope • Namespace / Class Level Variable • Procedure Level Variable • Block Level Variable Namespace Module Procedure Block

  9. Konstanta • Dideklarasikan dengan perintah Const : • Const dblRadius As Double = 2.34 • Nilai harus diinisialisasi pada saat deklarasi • Nilai tidak dapat diubah selama aplikasi berjalan • Menggunakan memori lebih sedikit dibandingkan dengan variabel

More Related