Skip to content

This is the wrong usage? #38

@imfox

Description

@imfox
using System;
namespace Game
{
    public static class Test
    {
        public static string name = "fox";
        public static void change()
        {
            Test.name = "not fox";   // error
            // name = "not fox";      // right
        }
    }

    public class DNF_Mobile
    {
        public static void Main() {
            Test.name = "im fox2";
            Test.change();
            System.Console.WriteLine(Test.name);
        }
    }
}

This is the wrong usage?
不能这样用吗?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions