|
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
IntroductionThis article helps in generating BackgroundI got this idea because we had 85 fields in a class for which we needed to write Using the codeStep 1Generate an XML file with all private member variables with attributes Step 2Apply XSL to above generated XML. Your XML file: <xmp>
<Names>
<Name datatype="int " suffix="int ">EmpCode</Name>
<Name datatype="string " suffix="str ">EmpName</Name>
</Names>
</XMP>
Apply XSLT to the above XML. The following code will be generated: public int EmpCode
{
get
{
return _intEmpCode;
}
set
{
_intEmpCode = value;
}
}
public string EmpName
{
get
{
return _strEmpName;
}
set
{
_strEmpName = value;
}
}
Points of InterestI learnt XML and XSLT.
|
||||||||||||||||||||||||||||||||||||||||||||