Skip to content

Fix CS0133 and change from "const" to "var" #685

@giggio

Description

@giggio

CS0133 will be raised if you are assigning to a constant. This fix will change const <type> to var.

This:

const string myStr = "abc".ToUpper();

Becomes, if it is a local variable:

var myStr = "abc".ToUpper();

Becomes, if it is in a field:

readonly string myStr = "abc".ToUpper();

Category: Compiler (same as CC0133, has to be added to SupportedCategories.cs)

@Poojith is working on it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions