B
Bhuwan Bhaskar
Hi,
What is type safety in Dot net?
Bhuwan
What is type safety in Dot net?
Bhuwan
Bhuwan Bhaskar said:What is type safety in Dot net?
Scott said:Essentially, it means that the compiler won't let you treat an apple like a
trampoline.
In other words, the compiler looks at the "type" you are working with in
your statements and makes sure that you only do things with or to that type
that are allowed for that type.
C# has this automatic type-safety built in by defalut. With VB .NET, you
must change the Option Strict setting in Tools...Options to On (the default
is off).
Scott said:Well, I think when most folk talk about type-safety, they are referring to
design-time, not run time.
After all, with your definition,
you could make
the argument that VB .NET is also bug-safe, since you'll get a runtime
exception or runtime anomoly when the program encounters bugs.
Bhuwan said:what are your views for 'type safety' and 'strongly typed' in dot net. I
will be obliged if you make my concept clear on these terms.