Live data from Hacker News

C# Tutorials

msdn.microsoft.com

31–40 of 66 posts

Re: C# Tutorials

#31
post #12

Unsafe code( pointers ), shows and example of a copy, where a byte* is casted to a int* and then dereferenced. Such operation in c produces undefined behavior( even if byte points to data large enough ). Safe or not, does c# consider such dereference as defined behavior?

There is no concept of "dereferencing" in C# because there are no pointers. Technically it is possible to force the environment to allow you to write unsafe code but I've never seen this in reality and I'm having a hard imagining where it would be useful.

The tutorial ( story link ) says otherwise: http://msdn.microsoft.com/en-us/library/aa288474%28v=vs.71%2...

Re: C# Tutorials

#32
post #24
post #3

These feel pretty outdated. C# 2, I believe? It has generics and delegates, but none of the things C# is appreciated for these days, such as LINQ, lambdas, async/await, etc.

In fact, there's written "Visual Studio .Net 2003", so pretty outdated I'd say. There are no references about Lamda expressions, LINQ, dynamic support, async support and all the other awesomeness C# gives.

The "Visual Studio .NET 2003" refers to the version of the documentation. If there are different versions you can click on it to see them. Simply go up to the parent page -- you will see an example of this. If you go to the latest version of the parent page then there is no "C# Tutorials" link on it.

Which is to say, newer versions of these tutorials probably do not exist.

Re: C# Tutorials

#34
post #12

Unsafe code( pointers ), shows and example of a copy, where a byte* is casted to a int* and then dereferenced. Such operation in c produces undefined behavior( even if byte points to data large enough ). Safe or not, does c# consider such dereference as defined behavior?

There is no concept of "dereferencing" in C# because there are no pointers. Technically it is possible to force the environment to allow you to write unsafe code but I've never seen this in reality and I'm having a hard imagining where it would be useful.

> There is no concept of "dereferencing" in C# because there are no pointers.

You seem to have confused C# with some totally different language [1].

[1] http://msdn.microsoft.com/en-us/library/y31yhkeb.aspx

Re: C# Tutorials

#35
Top things I miss in C#

- Null coalescing operator

- Tuple Construction/Deconstruction

- Algebraic data types/Pattern matching

- List comprehensions/array slicing

- Operators in interfaces

After 10 years of C# I really feel that F# is the future.

Re: C# Tutorials

#37
post #9

Fortunately this tutorial is very high-level and assumes you know another high-level programming language, which allows it to keep a quick pace, preventing it from getting too dry or slow. I submitted it because I read it last night after starting a new C# project, and was quite surprised to see that it wasn't just a strict subset of C like Objective-C is, but it's a whole language of its own, with some additions and…

> C# is only really practical for Microsoft's platforms. Not necessarily. If you're doing game development with Unity3D, for example, you're probably going to write much of your game in C#, and it's going to run on Windows, Linux, OS X, Android and iOS.

How does Unity3D get C# to run on all those platforms?

Re: C# Tutorials

#38
post #9

Fortunately this tutorial is very high-level and assumes you know another high-level programming language, which allows it to keep a quick pace, preventing it from getting too dry or slow. I submitted it because I read it last night after starting a new C# project, and was quite surprised to see that it wasn't just a strict subset of C like Objective-C is, but it's a whole language of its own, with some additions and…

> C# is only really practical for Microsoft's platforms

Couldn't agree more with that. This is the reason I stick with JVM based languages (Scala, Java) for high level stuff, C/C++ for low level stuff and naturally JavaScript for browser stuff. This pretty much covers everything and at the same time is unbeatable in performance.

Re: C# Tutorials

#39
post #9

Fortunately this tutorial is very high-level and assumes you know another high-level programming language, which allows it to keep a quick pace, preventing it from getting too dry or slow. I submitted it because I read it last night after starting a new C# project, and was quite surprised to see that it wasn't just a strict subset of C like Objective-C is, but it's a whole language of its own, with some additions and…

> C# is only really practical for Microsoft's platforms. Not necessarily. If you're doing game development with Unity3D, for example, you're probably going to write much of your game in C#, and it's going to run on Windows, Linux, OS X, Android and iOS.

Wish it was true. It has never been true and it is unlikely to be true in near future. Try some non toy F# on windows and on Mono and you will know. Mono leaks, and if you rely on correct behavior of tail calls, you are in for a lot of grief.

Re: C# Tutorials

#40

Earlier quoted context omitted.

> C# is only really practical for Microsoft's platforms. Not necessarily. If you're doing game development with Unity3D, for example, you're probably going to write much of your game in C#, and it's going to run on Windows, Linux, OS X, Android and iOS.

How does Unity3D get C# to run on all those platforms?

http://www.mono-project.com/What_is_Mono
Post reply on HN