</pre>
And it would ''not'' involve the relatively expensive boxing and unboxing conversions. This goes for any primitive and value type (primitive types are just a subset of value types). <code>int</code> is a value type, and in C# you can define new value types. Only when value types are treated ''like objects'' (reference types) are they boxed. You may declare arrays of custom value types and the array will contain the actual values not a boxed references to values. [[User:Useerup|Useerup]] ([[User talk:Useerup|talk]]) 23:23, 26 June 2011 (UTC)
== Is this entire article directly lifted from some page at microsoft.com? ==
Because it looks like it. It reads like an essay and one that seems to be written for Java programmers to switch to C#. [[User:Rajakhr|Rajakhr]] ([[User talk:Rajakhr|talk]]) 09:21, 18 May 2010 (UTC)
:If you compare two things, and one appears better, you can either:<br />- Hide your head in the sand, and claim it's a conspiracy<br />- Add meaningful and truthful arguments that were forgotten<br/>- Accept the apparent better one is the better one.<br />So please, contribute in a meaningful and truthful way, if possible...<br />[[User:Paercebal|Paercebal]] ([[User talk:Paercebal|talk]]) 13:04, 23 April 2011 (UTC)
::Besides, the goal of this comparison is not to determine which language or feature is ''better'', but simply to allow programmers to compare possibilities for expressing things in the two languages. [[User:Rp|Rp]] ([[User talk:Rp|talk]]) 08:03, 7 June 2011 (UTC)
== Setting the ground rules ==
'''SlothMcCarty''' that is very well put. However, there exists some "core" libraries or types for both languages which could be considered part of the language. Some are even mentioned in the respective language specs. My feeling is that these should be allowed in regardless of specific syntactical support. For instance, the ''class'' type of Java and the ''Type'' type of C#. As I see it, using the criteria you suggested, we should get rid of the "platforms" table as well as the collections among others. I would suggest a criteria for the rest: Good explanation contrasting the languages should follow each table section. [[User:Useerup|Useerup]] ([[User talk:Useerup|talk]]) 19:01, 14 August 2011 (UTC)
== Edit ==
I removed the following content:
"Another criticism of checked exceptions is that a new implementation of a method may cause unanticipated checked exceptions to be thrown., which is a contract-breaking change. This can happen in methods implementing an interface that only declares limited exceptions, or when the underlying implementation of a method changes. To allow for such unanticipated exceptions to be thrown, some programmers simply declare the method can throw any type of exception ("<code>throws Exception</code>"), which defeats the purpose of checked exceptions."
This may not happen with checked exceptions. A checked exception must be declared in the public API of the method (''throws'' clause) if you want to throw it. Therefore you may not throw a new type of checked exception unless you intentionally break the API, and this will not happen neither if you are just implementing an interface, nor change the method implementation (as it is not part of the API). --[[Special:Contributions/151.75.20.202|151.75.20.202]] ([[User talk:151.75.20.202|talk]]) 13:20, 26 May 2011 (UTC)
:You could have added '''un''' instead of removing the whole section. So your reason for removing it must be something else. I'm not sure whether this discussion should be present. Is discussing the ''consequences'' of diffferences between the languages too far beyond the scope of this article? [[User:Rp|Rp]] ([[User talk:Rp|talk]]) 21:27, 27 May 2011 (UTC)
::Actually criticism in the section is specifically about checked exceptions. There is no contract-breaking change if you throw a different unchecked exception, as you are always allowed to throw ''any'' unchecked exception type from within any method, so the section just doesn't make sense if you add ''un''. And, yes, maybe the appropriate place for that is [[Exception handling#Checked exceptions]]. --[[Special:Contributions/151.75.16.218|151.75.16.218]] ([[User talk:151.75.16.218|talk]]) 00:15, 28 May 2011 (UTC)
== Java unsigned integer type "char"? ==
:Thanks Skoobiedu. Good points. You are quite correct and I will try to edit the section (I already edited out the passage which could convey the impression that C# enums are not type-safe). Both languages are indeed completely type-safe, except for when ''unsafe'' sections are being used in C#. [[User:Useerup|Useerup]] ([[User talk:Useerup|talk]]) 09:29, 31 July 2011 (UTC)
== I think you're missing the point... ==
Some contributors have hinted at what I'm going to say. Perhaps it should be stated directly.
|