Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 3, Problem 1MQ8

Explanation of Solution

Statement used to declare a procedure-level variable:

'This program demonstrates how to declare a procedure-level 'named constant and assign the value on it.

Public Class frmMain

Double click the “Display” button and add the following code in the code editor window:

Private Sub btnDislpay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDislpay.Click

The “Display” button click event declares the procedure level variables.

'Declare the procedure-level named constant 'variable and assign a value as 10.5.

        Const decPAY As Decimal = 10.5D

The message box displays the named constant variable value.

           MessageBox...

Blurred answer
Students have asked these similar questions
Write a statement that uses an arithmetic assignment operator to add the number 1 to the intAge variable.
Write an assignment statement that increments the intTotal variable by the contents of the intQuantity variable.
Write an assignment statement that increments the intNumEmployees variable by 1.

Chapter 3 Solutions

Programming with Microsoft Visual Basic 2017

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning