diff --git a/XmlSchemaClassGenerator/TypeModel.cs b/XmlSchemaClassGenerator/TypeModel.cs index dede705d..6c7e771a 100644 --- a/XmlSchemaClassGenerator/TypeModel.cs +++ b/XmlSchemaClassGenerator/TypeModel.cs @@ -268,6 +268,7 @@ public override CodeTypeDeclaration Generate() var text = new CodeMemberField(typeof(string), "Text"); // hack to generate automatic property text.Name += " { get; set; }"; + text.Attributes = MemberAttributes.Public; var xmlTextAttribute = new CodeAttributeDeclaration(new CodeTypeReference(typeof(XmlTextAttribute))); text.CustomAttributes.Add(xmlTextAttribute); classDeclaration.Members.Add(text);