Static Constants in C#

前端 未结 3 1093
谎友^
谎友^ 2020-12-09 14:17

I have this code;

using System;

namespace Rapido
{
    class Constants
    {
        public static const string FrameworkName = \"Rapido Framework\";
    }          


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 15:03

    You don't need to declare it as static - public const string is enough.

提交回复
热议问题