|
| ||||||||||
| Tags: c sharp, dot net, object oriented language, programming language, visual studio |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How is C# Sharp a type safe language ?
|
|
#2
| ||||
| ||||
| Re: How is C# Sharp a type safe language ?
A characteristic of powerfully typed languages like Visual C# and the Java language is the type safety . Type-safe programs utilizes memory only in official, well-defined, and allowable ways. Codes that are type safe will not be able to perform operations that would not be valid for a particular object. The Microsoft Visual C# and VB.NET language compilers generate type-safe programs ; and, type safety is confirmed during JIT-compilation. Also, the PEVerify tool can be used to verify code type safety. |
|
#3
| |||
| |||
| Re: How is C# Sharp a type safe language ?
Type safety is the means for creating code that is simple to preserve. A typesafe language (and framework) locates bugs during compilation instead of finding them during runtime (generally after you have transported the product). The main limitation in C# 1.x was the nonexistence of generics, which allows users to declare a general compilation (for instance, a stack or a list) that can take members of any kind yet will be type-safe during compilation compile time. |
|
#4
| ||||
| ||||
| Re: How is C# Sharp a type safe language ?
In Version 1.x of the framework, almost all the set were declared to clutch object of System.Object, and since everything derives from System.Object class , these set could accept any type at all; that is, for that reason they cannot be called as type safe . There is no requirement to cast when you recover objects from a generic collection, and your program is safer, simpler to maintain, and much more easier to use simpler to use |
|
#5
| |||
| |||
| Re: How is C# Sharp a type safe language ?
.NET 2.0 get rid of all these problems with a new library of stes , which you will be able to locate in the System.Collections.Generic namespace. A generic set is basically a collection that permits s you to denote its member types whenever they are being declared . After they are declared, the compiler will let only objects of that sort to be added to the given list. You define generic collections with the help of unique syntax; the syntax makes the use of angle brackets to show variables that are obliged to be defined when an object of the collection is declared. But I do not think you are required to go in that depth , it is just for your knowledge. |
|
#6
| |||
| |||
| Re: How is C# Sharp a type safe language ?
In the world of computer science, type safety is the extent to which a programming language blocks or stops type errors. A type error is mistaken or unwanted program behavior caused by a inconsistency between varying data types. Type safety is every so often or else considered to be a belongings of a computer program rather than the platform in which that program is coded; that is, some languages have type-safe services that can be circumvented by programmers who take on their work that demonstrate bad type safety. The formal type-theoretic description of type safety is considerably stronger than what is interpreted by many of the programmers. These types of features also enables automatic garbage collection of variables that are not been initialized. |
|
#7
| |||
| |||
| Re: How is C# Sharp a type safe language ?
Type enforcement can be static, catching possible errors during compilation , or dynamic, correlated with type information with values during the run time and consulting them as required to identify about to happen flaws and mistakes , or a mixture of both.The behaviors categorized as type errors by a given programming language are usually those that result from attempts to perform operations on values that are not of the suitable data type. This categorization is partially based on judgment; some language developers and implementers dispute that any operation not tending to any program is bound to crash, security errors or other clear breakdown is justifiable and are not supposed be considered an error, while others consider any breach of the developer’s explicit target to be mistaken and they are not "type-safe." |
|
#8
| ||||
| ||||
| Re: How is C# Sharp a type safe language ?
Type safety enables robust programs. C# incorporates a number of type safe measures.
|
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How is C# Sharp a type safe language ?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sharp 007SH Hybrid An 3D Clamshell Android Phone by Sharp | jackalz | Web News & Trends | 3 | 22-05-2011 07:28 AM |
| Content Type | Mime Type for Office 2010 file format and extension | ramsun | Tips & Tweaks | 1 | 16-08-2010 05:25 PM |
| Content Type | Mime Type for Office 2007 file format and extension | D_chapple | Tips & Tweaks | 1 | 16-08-2010 04:44 PM |
| Data Types in C sharp language | Ram Bharose | Software Development | 5 | 28-12-2009 10:56 AM |
| Programming language C Sharp and its characteristics | Jesus-Ernesto | Software Development | 4 | 28-11-2009 12:06 AM |