1

in VS2015 Community I can use ctor to create a constructor inside my class.

How can I do this with VSCode in a Mac?

I have read about create my self and publish... but the documentation is not so clear for me... (link)

Thanks.

1 Answer 1

1

If you want to reproduce the exact behavior of ctor snippet from VS2015, you can't because VSCode isn't currently able to detect the class name.

So you will have to type the class name in your constructor :

"Constructor": {
    "prefix": "ctor",
    "body": [
        "public $0() {",
        "\t$1",
        "}"
    ],
    "description": "Create a constructor"
}
Sign up to request clarification or add additional context in comments.

1 Comment

Please edit the code... @Guillaume ;) You need a " and , in the body second line ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.