Skip to content

Multiple Classes  #1

Open
Open
@Weaver1911

Description

@Weaver1911

Hello there.
1st of all, i want to thank you about this tool. That's exactly what i wanted to create and i've failed -many times-.
This is not a simple HTTP server. It's gem.
But I'm trying to do something like this

 public MyClassCollection C1()
    {
        MyClassCollection result = new MyClassCollection
        {
            _Class2_data.MyFloat = 0.5f,
            _Class2_data.MyInt = 1,
            _Class2_data.MyString = "This is a test",
            
            _Class2_data._Class3_data.MyFloat1 = 0.5f,
            _Class2_data._Class3_data.MyInt1 = 1,
            _Class2_data._Class3_data.MyString1 = "This is a test 2"
        };
        return result;
    }

    public class MyClassCollection
    {
        public MyClass2 _Class2_data;

    }

    public class MyClass2
    {
        public float MyFloat;
        public int MyInt;
        public string MyString;
        public MyClass3 _Class3_data;
    }

    public class MyClass3
    {
        public float MyFloat1;
        public int MyInt1;
        public string MyString1;
    }

And seems to be impossible. Am i missing something?
Or maybe Is there any other way i can use to achieve that result ?

In reality is use 3rd party software to put values there like this
_Class2_data.MyFloat = MySoftwareOutput.value,

Thanks in advance.

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