What is a strong type, weak type, type, no type

Source: Internet
Author: User

. NET Framework and Visual Studio provide you with three main methods:ProgramIndicates data:

*
Dataset (including typed and non-typed) and datatable classes in ADO. net
*
Xmldatadocument and xmldocument classes in the system. xml namespace
*
Custom class containing Custom Attributes

Although the ADO. NET and system. XML Namespaces provide standard classes to represent data,
--- Strong type -------
Is the advantage of a custom class. It makes the data processed by objects easier to understand without dealing with ADO. NET and XML programming models. This is useful in large systems, especially when designing
Defines the data access layer composed of custom classes and releases the design to other programmers in the Organization. Of course, the use of custom classes is declining: they need to compile moreCodeBecause you
You must create an object link ing layer missing from the. NET Framework.

Strong/weak type indicates the type check degree. There are no types, weak types, and strong types of languages. If there is no type, do not check or even distinguish between commands and data. Weak type checks are weak, and only commands and data can be strictly distinguished. If the type is strong, it is strictly checked during the compilation period.

C # is a strongly typed language. Therefore, each variable and object must have a declaration type.

Specifying a data type for all variables is called a "strong type ".

Using strong types in. Net has the following advantages:
1. It enables intelliisense support for variables. This allows you to view the attributes and other members of the variable when entering the code.
2. it will use the compiler type check. This captures the statements that fail to run due to overflow or other errors. This can also capture calls to methods on objects that do not support methods.
3. Faster Code Execution

 

 

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.