# Unity C#'s version?

**URL:** <https://discussions.unity.com/t/unity-c-s-version/598017>\
**Category:** C# & .NET\
**Tags:** Scripting\
**Created:** [September 18, 2015, 2:22am UTC](https://discussions.unity.com/t/unity-c-s-version/598017 "2015-09-18T02:22:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![leegod](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@leegod](https://discussions.unity.com/u/leegod)\
**Post date:** [September 18, 2015, 2:22am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/1 "2015-09-18T02:22:43Z")

</div>

So up to what version unity c# support now?

5.0? or 6.0?

---

<div class="post-metadata">

**Author:** ![MadeThisName](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/madethisname/32/129533_2.png) [@MadeThisName](https://discussions.unity.com/u/MadeThisName)\
**Post date:** [September 18, 2015, 2:35am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/2 "2015-09-18T02:35:04Z")

</div>

You can run this to check the version

```csharp
Debug.Log(System.Enviroment.Version);

```

---

<div class="post-metadata">

**Author:** ![Kiwasi](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kiwasi/32/351502_2.png) [@Kiwasi](https://discussions.unity.com/u/Kiwasi)\
**Post date:** [September 18, 2015, 2:57am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/3 "2015-09-18T02:57:46Z")

</div>

Wait, is there an announcement I missed?

Last I heard we are using an old version of Mono, roughly equivalent to .Net 3.5.

---

<div class="post-metadata">

**Author:** ![Eric5h5](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/eric5h5/32/44225_2.png) [@Eric5h5](https://discussions.unity.com/u/Eric5h5)\
**Post date:** [September 18, 2015, 3:03am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/4 "2015-09-18T03:03:10Z")

</div>

No announcement, nothing has changed.

–Eric

---

<div class="post-metadata">

**Author:** ![Ryiah](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/ryiah/32/101141_2.png) [@Ryiah](https://discussions.unity.com/u/Ryiah)\
**Post date:** [September 18, 2015, 3:03am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/5 "2015-09-18T03:03:14Z")

</div>

They’re not asking for the framework version. They’re asking for the version of the language itself.

---

<div class="post-metadata">

**Author:** ![Kiwasi](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kiwasi/32/351502_2.png) [@Kiwasi](https://discussions.unity.com/u/Kiwasi)\
**Post date:** [September 18, 2015, 3:07am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/6 "2015-09-18T03:07:19Z")

</div>

> [@Ryiah](#):
>
> They’re not asking for the framework version. They’re asking for the version of the language itself.

Its essentially the same question.

[https://en.wikipedia.org/wiki/C\_Sharp\_(programming\_language)](https://en.wikipedia.org/wiki/C_Sharp_(programming_language))

---

<div class="post-metadata">

**Author:** ![Ryiah](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/ryiah/32/101141_2.png) [@Ryiah](https://discussions.unity.com/u/Ryiah)\
**Post date:** [September 18, 2015, 3:09am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/7 "2015-09-18T03:09:38Z")

</div>

Ah. Got it. I was trying to dig up if they were decoupled or not, but I didn’t think to check the Wiki.

---

<div class="post-metadata">

**Author:** ![MadeThisName](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/madethisname/32/129533_2.png) [@MadeThisName](https://discussions.unity.com/u/MadeThisName)\
**Post date:** [September 18, 2015, 3:11am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/8 "2015-09-18T03:11:56Z")

</div>

You can use some reflection to find out :):

```csharp
    usingSystem.Reflection;
    Type type =Type.GetType("Mono.Runtime");
    if(type !=null)
    {
    MethodInfo displayName = type.GetMethod("GetDisplayName",BindingFlags.NonPublic|BindingFlags.Static);
    if(displayName !=null)
    Debug.Log(displayName.Invoke(null,null));
    }

```

---

<div class="post-metadata">

**Author:** ![MadeThisName](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/madethisname/32/129533_2.png) [@MadeThisName](https://discussions.unity.com/u/MadeThisName)\
**Post date:** [September 18, 2015, 3:14am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/9 "2015-09-18T03:14:50Z")

</div>

Last i checked it was Unity 5.1 with NET 2.6.5

---

<div class="post-metadata">

**Author:** ![Kiwasi](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kiwasi/32/351502_2.png) [@Kiwasi](https://discussions.unity.com/u/Kiwasi)\
**Post date:** [September 18, 2015, 3:16am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/10 "2015-09-18T03:16:21Z")

</div>

> [@MadeThisName](#):
>
> Last i checked it was Unity 5.1 with NET 2.6.5

I believe that should be Mono 2.6.5

Mono version details can also be found on wikipedia

[https://en.wikipedia.org/wiki/Mono\_(software)](https://en.wikipedia.org/wiki/Mono_(software))

---

<div class="post-metadata">

**Author:** ![MadeThisName](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/madethisname/32/129533_2.png) [@MadeThisName](https://discussions.unity.com/u/MadeThisName)\
**Post date:** [September 18, 2015, 3:18am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/11 "2015-09-18T03:18:24Z")

</div>

lol It seems im missing the mark every time…I think nows the time for me to shut up.

---

<div class="post-metadata">

**Author:** ![Kiwasi](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kiwasi/32/351502_2.png) [@Kiwasi](https://discussions.unity.com/u/Kiwasi)\
**Post date:** [September 18, 2015, 3:20am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/12 "2015-09-18T03:20:57Z")

</div>

> [@MadeThisName](#):
>
> lol It seems im missing the mark every time…I think nows the time for me to shut up.

Its all good. Most of my Unity knowledge is just copied from @Eric5h5 's old posts. 🙂

---

<div class="post-metadata">

**Author:** ![Eric5h5](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/eric5h5/32/44225_2.png) [@Eric5h5](https://discussions.unity.com/u/Eric5h5)\
**Post date:** [September 18, 2015, 4:20am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/13 "2015-09-18T04:20:17Z")

</div>

(Wonder if I should tell him that I just make everything up.)

–Eric

---

<div class="post-metadata">

**Author:** ![leegod](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@leegod](https://discussions.unity.com/u/leegod)\
**Post date:** [September 18, 2015, 11:03am UTC](https://discussions.unity.com/t/unity-c-s-version/598017/14 "2015-09-18T11:03:42Z")

</div>

So, I found this for usage c# 5.0, 6.0 features in unity.

[https://bitbucket.org/alexzzzz/unity-c-5.0-and-6.0-integration/src](https://bitbucket.org/alexzzzz/unity-c-5.0-and-6.0-integration/src)

---

<div class="post-metadata">

**Author:** ![Baste](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/baste/32/880289_2.png) [@Baste](https://discussions.unity.com/u/Baste)\
**Post date:** [September 18, 2015, 12:28pm UTC](https://discussions.unity.com/t/unity-c-s-version/598017/15 "2015-09-18T12:28:11Z")

</div>

Just a reminder, from the [Roadmap](https://unity3d.com/unity/roadmap) under “IN-PROGRESS, TIMELINES LONG OR UNCERTAIN”:

> [@](#):
>
> Mono: Upgrade in-editor runtime
> 
> After IL2CPP platforms are rolled out, we will start finalizing and working on rolling out an upgraded version of Mono to run in the editor.

Also, since the numbering is confusing; Unity uses Mono version 2.6.5-with-some-extra-features (I believe), which supports C# 3. The latest version of Mono is Mono 4, which supports C# 6.

Even a “simple” jump up from 2.6.5 to 2.8 would give us C# 4 and a generational GC, so that would actually be huge.

Mono 2.6 was released back in 2009, while 2.8 was out in 2010. Unity has some real big technological debt here.

---

<div class="post-metadata">

**Author:** ![Kiwasi](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kiwasi/32/351502_2.png) [@Kiwasi](https://discussions.unity.com/u/Kiwasi)\
**Post date:** [September 18, 2015, 12:32pm UTC](https://discussions.unity.com/t/unity-c-s-version/598017/16 "2015-09-18T12:32:42Z")

</div>

> [@leegod](#):
>
> So, I found this for usage c# 5.0, 6.0 features in unity.
> 
> [https://bitbucket.org/alexzzzz/unity-c-5.0-and-6.0-integration/src](https://bitbucket.org/alexzzzz/unity-c-5.0-and-6.0-integration/src)

The features of C# 6.0 that can be implemented in the older CIL code can be implemented.

You are still out of luck with the advanced key words like dynamic.

(I think)

---

<div class="post-metadata">

**Author:** ![Ironmax](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/ironmax/32/382309_2.png) [@Ironmax](https://discussions.unity.com/u/Ironmax)\
**Post date:** [September 18, 2015, 1:48pm UTC](https://discussions.unity.com/t/unity-c-s-version/598017/17 "2015-09-18T13:48:38Z")

</div>

wtb linq and lambda expression for Unity

---

<div class="post-metadata">

**Author:** ![KelsoMRK](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kelsomrk/32/205687_2.png) [@KelsoMRK](https://discussions.unity.com/u/KelsoMRK)\
**Post date:** [September 18, 2015, 1:58pm UTC](https://discussions.unity.com/t/unity-c-s-version/598017/18 "2015-09-18T13:58:17Z")

</div>

> [@Ironmax](#):
>
> wtb linq and lambda expression for Unity

LINQ extension methods and lambda expressions work just fine in Unity.

---

<div class="post-metadata">

**Author:** ![Ironmax](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/ironmax/32/382309_2.png) [@Ironmax](https://discussions.unity.com/u/Ironmax)\
**Post date:** [September 18, 2015, 2:14pm UTC](https://discussions.unity.com/t/unity-c-s-version/598017/19 "2015-09-18T14:14:07Z")

</div>

> [@KelsoMRK](#):
>
> LINQ extension methods and lambda expressions work just fine in Unity.

.NET 4.5 or is that new in Unity 5+ ?

---

<div class="post-metadata">

**Author:** ![KelsoMRK](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kelsomrk/32/205687_2.png) [@KelsoMRK](https://discussions.unity.com/u/KelsoMRK)\
**Post date:** [September 18, 2015, 2:17pm UTC](https://discussions.unity.com/t/unity-c-s-version/598017/20 "2015-09-18T14:17:09Z")

</div>

What about it?

[Next page](https://discussions.unity.com/t/unity-c-s-version/598017.md?page=2)
