Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To set the property in the sub-template, you use the CopyPropertiesTo method of the master template. This method matches properties from the master template to the sub-template on the basis of name and type. If it finds an exact match, it copies the value from the master template to the sub-template. This code snippet shows how you can use this method:    

Code Block
languagecsharp
   // instantiate the sub-template

...


   Header header = this.Create<Header>();

...


   // copy all properties with matching name and type to the sub-template

...

 instance
   this.CopyPropertiesTo(header);