Hi WilliamOGorm-1523,
You need to use full name of nested class(RandomNameGenerator.CharacterExportTemplate) to create a new instance of the nested class.
As follows:
public CharacterTemplate CreateCharacter()
{
CharacterTemplate character = new CharacterTemplate();
RandomNameGenerator.CharacterExportTemplate characterexport = new RandomNameGenerator.CharacterExportTemplate();
character.title = characterexport.title;
character.lastname = characterexport.firstname;
character.lastname = characterexport.lastname;
return character;
}
More details about nested types,please refer to this document.
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.