Set assembly attributes : Assembly Attributes « Assembly « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.Text;
using System.EnterpriseServices;

[assembly: ApplicationName("Demo")]
[assembly: Description("C#")]
[assembly: ApplicationActivation(ActivationOption.Server)]
[assembly: ApplicationAccessControl(false)]


public interface IGreeting {
    string Welcome(string name);
}

[EventTrackingEnabled(true)]
[Description("Simple Serviced Component Sample")]
public class SimpleComponent : ServicedComponent, IGreeting {
    public SimpleComponent() {
    }
    public string Welcome(string name) {
        // simulate some processing time
        System.Threading.Thread.Sleep(1000);
        return "Hello, " + name;
    }
}
class Program {
    static void Main(string[] args) {
        using (SimpleComponent obj = new SimpleComponent()) {
            for (int i = 0; i < 10; i++) {
                Console.WriteLine(obj.Welcome("Kathie"));
            }
        }
    }
}








12.3.Assembly Attributes
12.3.1.Assembly attributes: AssemblyVersionAttribute, AssemblyTitleAttribute
12.3.2.Set assembly attributes
12.3.3.Dynamic Asm Builder