Is the syntax for VBScript and VB.NET exactly the same?
Specifically, would a syntax parser for VB.NET work for VBScript?
No, they are not the same.
vb.net is a jit-compiled strongly typed object oriented language that runs on the .net framework; vbscript is interpreted. Syntax is different in many subtle ways, mostly relating to scoping and the keywords necessary for vb.net to support true object oriented concepts that vbscript just doesn't have.
No, the syntax for VBScript is very similar to pre-.NET Visual Basic (i.e., VB6). VB.NET is completely different. But even compared to VB6, VBScript is still watered down.
No, the syntax for vbscript and vb.net are not exactly the same.
Related
I want to suppress FXCOP error(CA1811) for specific vb.net function.
Like <SuppressMessage()> in c#, do we alternative of this in VB.net?
I am new to vb.net.
FXCop analyzes the compiled assemblies, i.e., it doesn't care whether the assembly was written in C# or VB.NET.
Thus, the same technique that works in C# should also work in VB.NET. Note that, in VB.NET, the syntax for adding attributes is [SuppressMessage(...)] rather than C#'s <SuppressMessage(...)>.
I am working on migration of VB6 Application to VB.net.
the VB6 code uses ChrB quite often and I need to know how to convert it into vb.net
has anyone faced any similar issue..?
Regards,
Rasheed
VB.NET doesn’t support “byte-oriented” string methods.
VB Migration Partner provides the ChrB6 replacement method, which approximates the original VB6 method’s behavior but isn’t guaranteed to work well in all circumstances. This replacement method is marked as obsolete and methods invocations are flagged with a migration warning.
This might be as rare as a ginger unicorn, however, is there a source-to-source (transcompiler) that compiles down to vba?
I've got some c# financial functions that would be great to reuse in vba.
So after much searching it appears there isn't a transcompiler available as of 06/Aug/2014.
It would appear that people either:
(a) code directly in vba and accept the limitations of the language and tooling
or
(b) create a c# dll and reference from the vba host
e.g. A Simple C# DLL - how do I call it from Excel, Access, VBA, VB6?
I have few questions in mind. I am new to this field of Visual Basic so don't make fun of me.
1.) What are the differences between VB.NET and VB?
2.) I need to develop basic apps for Windows.(like a notepad) Which one should I use?
3.) Is there an IDE available for both?
4.) If possible can you suggest me a good resource for learning VB or VB.NET.
Note: I know C and Java. I couldn't find a satisfactory answer anywhere.
Stackoverflow always provides the most precise answers.
1.) What are the differences between VB.NET and VB?
VB.NET is a modern, object-oriented language. VB (Classic) is its predecessor, and it's no longer actively maintained.
I don't know if that is what you are looking for, but a technical comparison can be found in Wikipedia:
Comparison of Visual Basic and Visual Basic .NET
2.) I need to develop basic apps for Windows.(like a notepad) Which one should I use?
VB.NET. However, if you already know Java, the C# syntax might be more familiar to you. From a functional point of view, VB.NET and C# are almost equivalent.
3.) Is there an IDE available for both?
VB.NET applications can be developed with Visual Studio, the most recent version is 2013.
The VB Classic IDE is unsupported as of April 8, 2008.
4.) If possible can you suggest me a good resource for learning VB or VB.NET
This is off-topic for Stack Overflow.
What is the difference between VB and VB.NET?
Now VB.NET is object-oriented language. The following are some of the differences:
Data Type Changes
The .NET platform provides Common Type System to all the supported languages. This means that all the languages must support the same data types as enforced by common language runtime. This eliminates data type incompatibilities between various languages. For example on the 32-bit Windows platform, the integer data type takes 4 bytes in languages like C++ whereas in VB it takes 2 bytes. Following are the main changes related to data types in VB.NET:
. Under .NET the integer data type in VB.NET is also 4 bytes in size.
. VB.NET has no currency data type. Instead it provides decimal as a replacement.
. VB.NET introduces a new data type called Char. The char data type takes 2 bytes and can store Unicode characters.
. VB.NET do not have Variant data type. To achieve a result similar to variant type you can use Object data type. (Since every thing in .NET including primitive data types is an object, a variable of object type can point to any data type).
. In VB.NET there is no concept of fixed length strings.
. In VB6 we used the Type keyword to declare our user-defined structures. VB.NET introduces the structure keyword for the same purpose.
for more details you can refer http://dev.fyicenter.com/Interview-Questions/dotNet-1/What_is_the_difference_between_VB_and_VB_NET_.html
and to develop windows apps , my best language is C# and you can choose VB.NET too
vb vb.net
it is interpreter based language. it is compiled language,use the cls.
not a type safe language. it is a safe type language.
backward compatible. not backward compatible.
I recently learned that I could create Office Word macros with Visual Basic, but is it possible to use a different language? Visual Basic is ok for beginners, but I want to know if it's possible to use different languages, and how to set them up.
PS: Is lua possible at all? I love lua. I immagine lua would be a good macro language.
This related question is a good example of using lua with Excel. It in fact contains a lot of documentation about getting lua/Excel talking.
You can't directly work with other languages in Excel the way you can VBA. However, a lot of languages do have the ability to create COM objects (such as in the example above) which let you interact with Excel quite similarly to how you otherwise would do in VBA. Here's a Python package which does similarly.
But if you want to basically write lua code in the VBA editor and "change language" then no, you can't.