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.
C# Tutorials
31–40 of 66 posts
Re: C# Tutorials
#32These 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.
Which is to say, newer versions of these tutorials probably do not exist.
Re: C# Tutorials
#33C# is awesome but this tutorial is way too old.
Can you recommend a newer one?
I would recommend it if you think you already know C# basics and want to learn more advanced stuff.
Re: C# Tutorials
#34Unsafe 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.
You seem to have confused C# with some totally different language [1].
Re: C# Tutorials
#35- 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
#36In broad strokes, what are the differences between Java and C# and why should I bother with it? (Disclosure: I hate Java)
Re: C# Tutorials
#37Fortunately 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.
Re: C# Tutorials
#38Fortunately 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…
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
#39Fortunately 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.
Re: C# Tutorials
#40Earlier 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?