A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/icsharpcode/ILSpy/issues/1832 below:

Tuples deconstructing support · Issue #1832 · icsharpcode/ILSpy · GitHub

Skip to content Navigation Menu

Saved searches Use saved searches to filter your results more quickly

Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert Additional navigation options

Tuples deconstructing support #1832

Description

ILSpy version 6.0.0.5410-alpha1

Continuing games with new features, mainly tuples deconstructing
https://docs.microsoft.com/en-us/dotnet/csharp/deconstruct

input test code

 public class TestDeconstructors
        {
            private int a1, a2, a3;
            public void Deconstruct(out int a1, out int a2, out int a3)
            {
                a1 = this.a1;
                a2 = this.a2;
                a3 = this.a3;
            }

            public void Test1(TestDeconstructors other)
            {
                (a1, a2, a3) = other;
            }
        }

ILSpy:

public class TestDeconstructors
{
	private int a1;

	private int a2;

	private int a3;

	public void Deconstruct(out int a1, out int a2, out int a3)
	{
		a1 = this.a1;
		a2 = this.a2;
		a3 = this.a3;
	}

	public void Test1(TestDeconstructors other)
	{
		other.Deconstruct(out int num, out int num2, out int num3);
		a1 = num;
		a2 = num2;
		a3 = num3;
	}
}

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4