Win32 and Dot NET conceptual issues in Windows

Source: Internet
Author: User
Tags data structures dot net visual studio 2010

running platform:1, the CLR is a. NET running engine and the core of. NET, using CIL JIT 2, Win32 to run the build executable directly

Visual Studio offers select libraries and platforms, 1, MFC/API (c + + compiler with C + + standard library 2, ATL 3, Character set 4, common language support (platform selection)

(Optional platform language)

Visual C + + is biased towards invoking Win32 but can also use the CLR to have C++/CLR

(NET platform only)

VisualBasic has been integrated into the CLR to use. NET and Win32

C # relies on. NET to also use the Win32 integrated Net library inside

Visual Studio has Java C + + basic C # to CIL parsers, along with C + + Basic to executable program compiler F # and other compilers.

C # is a one-way language that is created for the. NET Framework.. NET is designed to achieve a wide range of applications such as mobile phones and other platforms.

Reference to. NET class libraries in C + +

NET is divided into two categories: values and references, value objects can be stored on the stack, and reference type objects are stored on the managed heap.

Managed C + + can also enjoy several good mechanisms for managed operation.
Learn a few symbols first:
^: References to managed heap objects
%: Managed object reference dereference reference type (similar to &) This is more complex, see the following example (1):
Ref: Defining a reference type
Val: Defining Value-Type classes

Gcnew: Creating objects on the managed heap (no old syntax rules are used here __gc)

Example (1):

void F (class1% c) {
C.show ();
}

int _tmain (int argc, _tchar* argv[])
{
class1^ C1 = gcnew Class1 ();
f (*C1);
return 0;
}

Operating Environment: CLR

struct S//c++ value type
{
int i;
};

Value struct ValS//values Type
{
int i;
};

ref struct RefS//reference type
{
int i;
};

void TestProc1 ()
{
s S;
S.I = 10;
s *ps = new S ();
Ps->i = 20;
s ^gcs = gcnew s (); Error because S is a C + + value type and cannot be established in the managed heap
Gcs->i = 30;
s^%rgcs = GCS;
Rgcs->i = 40;
System::console::writeline (S.I);
System::console::writeline (Ps->i);
}

void TestProc2 ()
{
    ValS s;
    s.i = ten
    ValS *ps = new ValS ();
    ps->i = 20;
    ValS ^gcs = gcnew ValS ();//Can be established in the managed heap
    gcs->i =
    vals^%rgcs = gcs; /Note This syntax, references to the managed heap use '% ' (managed reference) instead of ' & ' (unmanaged reference)
    rgcs->i =;
    System::console::writeline (S.I);
    System::console::writeline (ps->i);
}

void TestProc3 ()
{
RefS s;
S.I = 10;
RefS *ps = new RefS (); Error, can only be established in the managed heap
Ps->i = 20;
RefS ^gcs = gcnew RefS (); Building in the managed heap
Gcs->i = 30;
refs^%rgcs = GCS; Note this syntax, references to the managed heap use '% ' (managed reference) instead of ' & ' (unmanaged reference)
Rgcs->i = 40;
System::console::writeline (S.I);
System::console::writeline (Ps->i);
}

Visual Basic Version

Starting in 2002, Microsoft has combined the. NET Framework with Visual Basic to become Visual Basic. NET (VB. net) to recreate VB, add a lot of features and syntax, and push VB to a new level. The latest version of Visual Basic 2012 will also bring many new features that are expected. Through several years of development, it has become a specialized development language and environment. Users can quickly create Windows programs in Visual Basic and write enterprise-level client/server programs and powerful database applications.

Visual Basic versions of the interface (8 pieces)

A brief history of Visual Basic development
Release date name Description
before the. NET Framework was introduced
1991-04 Visual Basic 1.0 Windows version
1992-09 Visual Basic 1.0 DOS version
1992-11 Visual Basic 2.0 Improved interface and speed for the previous version.
1993-06 Visual Basic 3.0 Contains a data engine that can directly read an Access database.
1995-08 Visual Basic 4.0 32-bit and 16-bit versions were released. This includes support for classes.
1997-02 Visual Basic 5.0 Includes support for user-built controls, and VB can support Chinese from this version.
1998-10 Visual Basic 6.0
after the. NET Framework is introduced
2002-02 Visual Basic. NET 2002 (7.0) Because of its use of new core and characteristics, so many VB programmers have to rewrite the program.
2003-04 Visual Basic. NET 2003 (7.1) Major improvements to the health of the IDE and run-time stability.
2005-11 Visual Basic 2005 (8.0) is a major shift in VB. NET, and Microsoft is determined to remove the ". NET" part of its name. VB2005 provides new language features, such as my pseudo-namespace, generics, operator overload, and so on.
2007-11 Visual Basic 2008 (9.0) Provides new language features that support IIF functions, anonymous classes, LINQ, Lambda expressions, XML data structures, and so on.
2008-03 Microsoft announces end of extension support for VB 6.0.
2010-04 Visual Studio 2010 (10.0) Provides new language features such as support for Dynamic Language Runtime (DLR), automatic implementation of properties, collection initialization, and no need to enter underline "_" when code breaks.
2012-05 Visual Studio (11.0) RC Provides new language features that support simpler asynchronous programming (asynchronous programming), iterator, augmented Global keywords, and more.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.