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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…