Is there any way, how to convert this:
namespace Library
{
    public struct Content
    {
        int a;
        int b;
    }
}
I have struct in Library2.Content that has data defined same way
({ int a; int b; }), but different methods.
Is there a way to convert a struct instance from Library.Content to Library2.Content? Something like:
Library.Content c1 = new Library.Content(10, 11);
Library2.Content c2 = (Libary2.Content)(c1); //this doesn't work
                You have several options, including:
Library2.Content and pass in the values of your Library.Content to the constructor.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With