Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Rani Singh   on Nov 27 In Asp.net Category.

  
Question Answered By: Dale Jones   on Nov 27

Basically there are some things you can do in C# and VB.net that means
other languages may not be able to inherit the code and/or consume it properly.

For example C# supports unsigned INTs which are not a type that all .net
languages are guaranteed to support. If one used them as parameters to a
function a language like VB.net or Perl.net could not call that function.

If the unsigned INT happened inside the function any language could call
that function but if it appeared as parameter/signature a language that
could not construct an unsigned INT would have trouble calling it.

Same thing with Case Sensitive methods in C#

C# could call a DoTask() or doTask() method and would be calling 2 distinct
methods because their are 2 separate mothods case-sensitivity is what makes
them different.

If VB.net called the function Dotask or any of the capitalization variants
it would be ambigous which to call so we would call the C# class with case
sensitive methods "NOT CLS compliant".

C# and VB.net compilers have switches to check for CLS compliant and warn
if violated.


There are other good practices besides CLS compliance that FXCOP can catch.....
http://www.gotdotnet.com/team/libraries/
Just because code works and is fast enough does not ensure it is
written the best way.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Using an array as an optional parameter Or get search suggestion and latest updates.


Tagged: