Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: this class type #13397

Closed
umanduz opened this issue Aug 26, 2016 · 2 comments
Closed

Suggestion: this class type #13397

umanduz opened this issue Aug 26, 2016 · 2 comments
Labels
Area-Language Design Resolution-Duplicate The described behavior is tracked in another issue

Comments

@umanduz
Copy link

umanduz commented Aug 26, 2016

Is it possible to add special keyword to return this class type? We need if we use inherited class.

public class A
{
    public this Method1 ()
    {
        // do something
        return this;
    }
}

public class B : A
{
    public B Method2 () {}
}

var b = new B ();
b.Method1().Method2();
@alrz
Copy link
Member

alrz commented Aug 26, 2016

Duplicate of #311

@jcouv
Copy link
Member

jcouv commented Sep 1, 2016

Closing as duplicate.

@jcouv jcouv closed this as completed Sep 1, 2016
@jcouv jcouv added the Resolution-Duplicate The described behavior is tracked in another issue label Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Language Design Resolution-Duplicate The described behavior is tracked in another issue
Projects
None yet
Development

No branches or pull requests

4 participants