Talk:C Sharp syntax
![]() | Microsoft: .NET Unassessed | ||||||||||||
|
Generics
Quote from the article:
The compiler will automatically replace every T in the code with the type you want to replace it with.
.NET parameterized types are instantiated at runtime rather than by the compiler
Done. Feel free to point out any more mistakes Aly89 (talk) 23:27, 4 November 2008 (UTC)
3.0
- From article:
This article contains new features of the upcoming C# 3.0. These features are not yet officially released.
Since C# 3.0 has been released already, this paragraph needs to be updated. 88.131.91.2 (talk) 11:40, 19 January 2009 (UTC)
Draft
Recently I've been writing a draft for this article. The purpose is to re-write the article to make it an even better one.
If you want to read it or perhaps edit it you'll find it here: User:Sundström/Drafts/C_Sharp_syntax
Contributions are needed and comments are appreciated. Robert Sundström (talk) 11:37, 24 July 2009 (UTC)
Merge proposal
I have not got any responses from any other user. Do anyone think that we could merge this article with the draft. Is that okay? Robert Sundström (talk) 21:44, 3 August 2009 (UTC)
- I think that this article has been abandonned and I have taken the initiative of merging these articles, Robert Sundström (talk) 10:36, 28 August 2009 (UTC)
I believe that the articles are well enough that they should be merged --Azatos (talk) 01:58, 26 September 2009 (UTC)
Syncronization
The article contains no information on the lock keyword. OrangeDog (talk • edits) 22:18, 29 September 2009 (UTC)
You
The use of "you" (i.e., first person voice) needs to be eliminated from this article. For example, "You can assign a value to a variable" should be rewritten as "A value can be assigned to a variable". — Loadmaster (talk) 23:48, 13 November 2009 (UTC)
Pointer syntax
In the pointers example, shouldn't the second line read:
Console.WriteLine("Value of b: {0}. pointed by b: {1}", b, *b);
(I didn't edit myself since I don't know C♯; but the code doesn't correlate with the comment about both lines producing the same value according to C syntax.) Diggory Hardy (talk) 18:19, 18 November 2009 (UTC)
LINQ Syntax
The article states rather vaguely that the reason 'from' comes before 'select' in the query syntax is "because it seems more natural writing like this in C#."
Now, I've read or heard (can't remember source which is why I didn't edit myself) that the reason for this is simply because IntelliSense would not work unless 'from' was first. Before the 'from' is entered, the editor cannot know the type of the item and cannot assist with popups etc. Can anyone confirm this? --Isaksavo (talk) 17:39, 18 December 2009 (UTC)
- The developers behind the LINQ syntax said that it is more convenient for a C-programmer to write a query this way. Correct me if I am wrong because it has been a while since I actually watched that talk. Maybe I should try to find it. --Robert Sundström (talk) 09:11, 5 April 2010 (UTC)
immutable strings?
C Sharp syntax#string class says:
- string class represents an immutable sequence of unicode characters.
Surely string objects can be changed? Mitch Ames (talk) 11:15, 4 April 2010 (UTC)
- No. When you perform an operation on a string you will get a new one. It is possible to use the StringBuilder class but the actual type System.String is immutable. Robert Sundström (talk) 09:03, 5 April 2010 (UTC)