If you put an attribute Foobar on a class or class member then code
accessing your code via reflection can use the information from the
attribute to change what it will do with your code.
Example:
using System;
using System.Xml.Serialization;
namespace E
{
public class UglyName
{
}
[XmlRoot(ElementName="this-is-a-nice-name")]
public class AnotherUglyName
{
}
public class Program
{
public static void Main(string[] args)
{
(new XmlSerializer(typeof(UglyName))).Serialize(Console.Out, new
UglyName());
Console.WriteLine();
(new XmlSerializer(typeof(AnotherUglyName))).Serialize(Console.Out,
new AnotherUglyName());
Console.ReadKey();
}
}
}
Arne