Where is the reference for .net framework?

For any of Unity’s classes, if I wanted to find out how, for example, Input.GetAxis works, I would go to the scripting reference on Unity’s website and get clear and simple documentation. Which is awesome. Back when I used Flash AS3, Adobe had a similar documentation website.

But with .NET framework, I can’t find any such thing. And the MSDN is an impenetrable maze for me.
Where can I find documentation similar to Unity’s for .NET stuff?

http://msdn.microsoft.com/en-us/library/System(v=vs.110).aspx
http://docs.go-mono.com (perpetually incomplete; you’re better off with MSDN)

–Eric

I agree with Eric… use MSDN, but use this link instead:
http://msdn.microsoft.com/en-us/library/System(v=vs.90).aspx

Eric’s link takes you to .NET 4.5 while the Mono implementation in Unity is primarily .NET 3.5. This link will take you to the .NET 3.5 reference.

1 Like

I can’t recall the last time I have actually gone to either docs.unity3d.com or msdn and started there. I always simply Google it - like if I need the syntax to declaring a List, “C# List generic syntax”. 99% of the time it takes me to the exact page I want without having to navigate the “impenetrable maze” of MSDN.

3 Likes

Oh nice, thanks. Speaking of .NET 4.5 vs .NET 3.5, isn’t 4.5 not supported on Windows XP system? So if I were to build a game with .NET 4.5 as the target, it would not run on Win XP?

Unity uses Mono, not .NET. When you see something like “Unity uses .NET 3.5”, you should read it as “Unity uses the version of Mono which is more or less identical to .NET 3.5”. If my understanding is correct, the available version of .NET on the target platform is irrelevant.

That said… Unity uses a version of Mono that’s equivalent to .NET 2.0. 4.5 isn’t even a choice.

1 Like

It’s equivalent to .NET 3.5, not 2.0. For example, LINQ, extension methods, implicit typing, etc. etc. It’s true that Unity uses Mono on all platforms including Windows…except WP8, where in fact it does use real .NET (which causes problems because that version of .NET is missing a bunch of stuff that’s in the version of Mono used in Unity).

–Eric

https://docs.unity3d.com/401/Documentation/ScriptReference/MonoCompatibility.html has more specific info on what is supported

How do you figure it’s compatible with .NET 3.5? Everywhere (including within Unity, and @Foam 's link) says “.NET 2.0” and subset - what does that version number mean if not the equivalent .NET version?

I assume that means “.NET 2.0 (or higher)”. Because Unity does use those things I mentioned (LINQ and so on), which are not in .NET 2.0. Although it’s more accurate to say “approximately .NET 3.5” since not everything matches up exactly.

–Eric

.NET 3.5 is actually a superset of .NET 2.0. In fact, 3.5 is part of the 2.0 product and just added a bunch of new functionality (just like 4.5 is really 4.0 but with new goodies).

In addition to WP8, 4.5 is also used for Windows Store Apps so there are some things to workaround, but 3.5 is what you need to target for the most part.

…the only way they could have possibly made their versioning scheme more confusing would be if they’d gone backwards. :eyes:

They’d have almost been better off just randomly naming the damn things, for all the sense that makes. “.NET Pineapple is a superset of .NET Chair, just like .NET Pencil is really .NET Iceberg with some new features.”

2 Likes

Well I was trying to make it more clear… technically 3.5 is a Subset of 2.0 I guess… not a superset… It just adds functionality to 2.0.

yes that definitely would have been better :roll_eyes:

Everything here is NET 2.0. How do we know what parts of 3.5 are usable or are not available?

Are mostly language features, not framework.

There’s three things going on:

  • The CLR, which is the actual virtual machine and environment your code runs in. .NET 2.0, 3.0, and 3.5 all use CLR 2.0; .NET 4 shipped CLR 4.0. Unity’s Mono is effectively CLR 2.0.
  • The .NET Libraries, which are all the System.Whatever namespaces. Each version of .NET has shipped some new libraries. Libraries through to 3.5 all can be run on CLR 2.0; the libraries in .NET 4 require CLR 4.0.
  • The C# language. C# 3.0 code can be compiled to run on the CLR 2.0; C# 4.0 code requires CLR 4.0.
2 Likes

This is also from the company that named it windows 7 even though the version is windows 6.1. Need I even bring up the naming idea for the OneBox to rule them all and in the darkness kinda suck.

Relevant: x.com

Thanks a lot for that. That info exists in various places of course but it is nice to see it put together in that way