Can you use Enum for Double variables?

后端 未结 6 478
情话喂你
情话喂你 2021-01-02 07:00

I have created a class for handling Unit Conversion in C#. It is not working as it should only returning strings.

Here is the class:

using System;
us         


        
6条回答
  •  隐瞒了意图╮
    2021-01-02 07:47

    Nope:

    I tried giving this to Visual Studio:

    public enum Test : double
    {
        Hello, World
    }
    

    And it said:

    Type byte, sbyte, short, ushort, int, uint, long, or ulong expected

提交回复
热议问题