View Single Post
Deather
New Member
Join Date: Nov 2016
Old 06-24-2020 , 16:10   Re: Enum Structs Available This Holiday Season
Reply With Quote #40

Code:
enum struct STest
{
    int a;
    int b;
}
STest test;

STest[] GetTest()
{
   return test;
}
Its works, but there is a problem with calling struct methods.

There is also a problem with using the same struct type as a method argument type:
Code:
enum 
struct STest
{
    int a;

    void Add(STest x)
    {
       a += x.a;
    }
}
STest test;
Deather is offline