beingtopper.jkp@gmail.com
+91-8700702530
Free Demo

Being Topper

  • About Us
  • Knowledge Base
  • Modules
  • Branches
    • Ajmer
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us

Being Topper

  • About Us
  • Knowledge Base
  • Modules
  • Branches
    • Ajmer
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us
  • About Us
  • Knowledge Base
  • Modules
  • Branches
    • Ajmer
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us

Being Topper

  • About Us
  • Knowledge Base
  • Modules
  • Branches
    • Ajmer
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us
BCA NOTESVB.Net progrmas

VBScript Full Program for structure | Structure in VBScript

Being Topper 18/01/2014 0 Comments

Before Writing a program for structure in VBScript we have to know what is a structure .? A structure is a generalization of the user-defined type (UDT) supported by previous versions of Visual Basic (VB). In addition to fields, structures can expose properties, methods, and events. A structure can implement one or more interfaces, and you can declare individual access levels for each field.

 

You can combine data items of different types to create a structure in VBscript. A structure link one or more elements with each other and with the structure itself. When you declare a structure in VBScript, it becomes a composite data type, and you can declare variables of that type.

Structures in VB Script are useful when you want a single variable to hold several related pieces of information. For example, you might want to keep a student’s name, telephone extension, and fee together. You could use several variables for this information, or you could define a structure and use it for a single student variable. The advantage of the structure becomes apparent when you have many students and therefore many instances of the variable.

 

Write a program for structures in VB Script

 

Here is a full VBScript Program for structure but if You Don’t Basics About Structures

we recommend you to check Basics First about Structures in VBScript  :

 

How to: Declare a Structure in VBScript
Shows how to declare a structure and its elements.

VB Script Structure Variables
Covers assigning a structure to a variable and accessing its elements.

VBScript Structures and Other Programming Elements
Summarizes how structures interact with arrays, objects, procedures, and each other.

VBScript Structures and Classes
Describes the similarities and differences between structures and classes.

 

Vbscript Program for Structure :

Imports System.Console

Module Module1

Structure student
Public rollno As Integer
Public name As String
Public Sub display()
WriteLine("The roll No. Is : " & rollno)
WriteLine("The Name is : " & name)
End Sub
Public Sub New(ByVal r As Integer, ByVal n As String)
name = n
rollno = r
End Sub
End Structure

Sub Main()
Dim x As Integer
Dim y As String
WriteLine("Enter Your Name : ")
y = ReadLine()
WriteLine("Enter Your Rollno. : ")
x = ReadLine()
Dim s1 As student = New student(x, y)
s1.display()

End Sub

End Module

 

OUTPUT of VB Script Program For Structure :

VBscript  program for structures.

AboutBeing Topper
In Socials:
Prevc++ program to perform naive string matching25/05/2013
program on break apart a number in java18/02/2014Next

Related Posts

B.tech notesBasic ProgramsBCA NOTESInformation technologyJava Programs

java program for checking prime number

checking prime number import java.util.Scanner ; class CheckPrime { public static void...

Being Topper 18/02/2014
B.tech notesBCA NOTESC++ programInformation technologyPrograms/Algorithm

Write a C program to generate Pascal’s triangle

Examples to  Pascal’s Triangle  in C Programming using control statements....

Being Topper 18/02/2014
Categories
Recent Posts
  • Best Email Marketing Software and Services
  • How to Apply Adsense on YouTube
  • Complete Guide to Writing a Newsletter !
  • Benefits of Creating Email List for small Businesses | Digital Marketing
  • Create Account or Get Email Alerts When New Employees Join a Company

Copyright © 2021 Being Topper ® . All Rights Reserved