Visual Basic History

0 views
Skip to first unread message

Riitta Palazzo

unread,
Aug 5, 2024, 9:15:25 AM8/5/24
to clearliropa
VisualBasic / Visual Studio 2008

Language Integrated Query (LINQ), XML literals, local type inference, object initializers, anonymous types, extension methods, local var type inference, lambda expressions, if operator, partial methods, nullable value types


Visual Basic 16.0 focuses on supplying more of the features of the Visual Basic Runtime (microsoft.visualbasic.dll) to .NET Core and is the first version of Visual Basic focused on .NET Core. Many portions of the Visual Basic Runtime depend on WinForms and these will be added in a later version of Visual Basic.


In Visual Basic 15.8 and earlier versions, comments are only allowed on blank lines, at the end of a statement, or in specific places within a statement where an implicit line continuation is allowed. Starting with Visual Basic 16.0, comments are also allowed after explicit line continuations and within a statement on a line beginning with a space followed by an underscore.


In previous versions of Visual Basic, conversion of Double and Single values to integers offered relatively poor performance. Visual Basic 15.8 significantly enhances the performance of floating-point conversions to integers when you pass the value returned by any of the following methods to one of the intrinsic Visual Basic integer conversion functions (CByte, CShort, CInt, CLng, CSByte, CUShort, CUInt, CULng), or when the value returned by any of the following methods is implicitly cast to an integral type when Option Strict is set to Off:


This optimization allows code to run faster -- up to twice as fast for code that does a large number of conversions to integer types. The following example illustrates some simple method calls that are affected by this optimization:


In Visual Basic 15.3 and earlier versions, when a method call included arguments both by position and by name, positional arguments had to precede named arguments. Starting with Visual Basic 15.5, positional and named arguments can appear in any order as long as all arguments up to the last positional argument are in the correct position. This is particularly useful when named arguments are used to make code more readable.


This new keyword combination defines a member that is accessible by all members in its containing class as well as by types derived from the containing class, but only if they are also found in the containing assembly. Because structures cannot be inherited, Private Protected can only be applied to the members of a class.


Visual Basic 2017 added support for the underscore character (_) as a digit separator. Starting with Visual Basic 15.5, you can use the underscore character as a leading separator between the prefix and hexadecimal, binary, or octal digits. The following example uses a leading digit separator to define 3,271,948,384 as a hexadecimal number:


When you assign the value of tuple elements from variables, Visual Basic infers the name of tuple elements from the corresponding variable names; you do not have to explicitly name a tuple element. The following example uses inference to create a tuple with three named elements, state, stateName, and capital.


The Visual Basic command-line compiler now supports the -refout and -refonly compiler options to control the output of reference assemblies. -refout defines the output directory of the reference assembly, and -refonly specifies that only a reference assembly is to be output by compilation.


Tuples are a lightweight data structure that most commonly is used to return multiple values from a single method call. Ordinarily, to return multiple values from a method, you have to do one of the following:


Visual Basic's support for tuples lets you quickly define a tuple, optionally assign semantic names to its values, and quickly retrieve its values. The following example wraps a call to the TryParse method and returns a tuple.


You can define a binary literal by using the prefix &B or &b. In addition, you can use the underscore character, _, as a digit separator to enhance readability. The following example uses both features to assign a Byte value and to display it as a decimal, hexadecimal, and binary number.


C# supports reference return values. That is, when the calling method receives a value returned by reference, it can change the value of the reference. Visual Basic does not allow you to author methods with reference return values, but it does allow you to consume and modify the reference return values.


For example, the following Sentence class written in C# includes a FindNext method that finds the next word in a sentence that begins with a specified substring. The string is returned as a reference return value, and a Boolean variable passed by reference to the method indicates whether the search was successful. This means that in addition to reading the returned value, the caller can also modify it, and that modification is reflected in the Sentence class.


In its simplest form, you can modify the word found in the sentence by using code like the following. Note that you are not assigning a value to the method, but rather to the expression that the method returns, which is the reference return value.


A problem with this code, though, is that if a match is not found, the method returns the first word. Since the example does not examine the value of the Boolean argument to determine whether a match is found, it modifies the first word if there is no match. The following example corrects this by replacing the first word with itself if there is no match.


A better solution is to use a helper method to which the reference return value is passed by reference. The helper method can then modify the argument passed to it by reference. The following example does that.


You can get the unqualified string name of a type or member for use in an error message without hard coding a string. This allows your code to remain correct when refactoring. This feature is also useful for hooking up model-view-controller MVC links and firing property changed events.


You can use string interpolation expressions to construct strings. An interpolated string expression looks like a template string that contains expressions. An interpolated string is easier to understand with respect to arguments than Composite Formatting.


You can test for null in a very light syntactic way before performing a member access (?.) or index (?[]) operation. These operators help you write less code to handle null checks, especially for descending into data structures. If the left operand or object reference is null, the operations returns null.


Given code such as Threading.Thread.Sleep(1000), Visual Basic used to look up the namespace "Threading", discover it was ambiguous between System.Threading and System.Windows.Threading, and then report an error. Visual Basic now considers both possible namespaces together. If you show the completion list, the Visual Studio editor lists members from both types in the completion list.


You can implement readonly interface properties using a readwrite property. The interface guarantees minimum functionality, and it does not stop an implementing class from allowing the property to be set.


Now the compiler will use normal overload resolution rules to choose the most appropriate GetDetails to call, and you can declare interface relationships in Visual Basic like those shown in the sample.


Inside of a computer there is Central Processing Unit which has Arithmetic Logic Unit. The Arithmetic Logic Unit uses some program. This Arithmetic Logic Unit is enclosed inside a very strong container and is used to store or memorize pieces of information for later use. Therefore Programming is central to the success of goal planning in many organizations. Over the years, organizational activity planning has progressed from heavily manual to highly sophisticated and interactive machine language. This has made planning not only fast, but also easy and more effective. Machine use in activity planning has often been referred to as programming.


Computers are the most instrumental programming machines as they play host to several programming languages; from the most basic to the most sophisticated and from the very simple and static programs to the highly complex and dynamic ones. These languages and many more have succeeded in granting cost effective solutions and high performances in organizations for speedy development; a demand that increases with age. In the recent internet market arena, for instance, unique or relevant website templates are not enough for profitability. Rather, website flexibility made applicable by an understanding of numerous web programming languages and/or platforms that satisfy organizational expertise and subsequently, the needs of their clientele is the surest way to profitability.


Visual basic programming is the easiest and cheapest for programmers to use in any computer and its available to those users who share the computer. It is normally a tactical product although it is fourth generation programming system. it is normally used in Microsoft.


Visual Basic owes its existence to developments made by Alan Cooper in 1987. However this program originally in 1963 when Dartmouth College thought of making computers available to their students therefore they designed a programming language in 1964 that will be used as a tool for training. In 1975 a company launched it is version of basic programming language.the companies involved in launching a programming language with its BASIC features included Microsoft and IBM computers the following is the table showing how visual basic program evolved.


Specifications for Visual Basic use were made available by Alan Cooper in late 1987when, for the first time, he defined the language that was to be used by the users of programming. According to Alan Cooper, Visual Basic was programming language. The first proposal for Visual Basic specification was published 1987 draft which included the programming language. Definition of the language provided by Alan Cooper helped in the development in the in the language.

3a8082e126
Reply all
Reply to author
Forward
0 new messages