Sunday, May 12, 2013

Basics Of Attributes in .Net Framework

The Attributes are the declarative informations used to instruct the .Net Runtime. The attributes can work with types, fields, methods and properties. These informations are stored with the metadata file. By using the Attributes the developer can control the CLR. So we will get a dynamic behaviour from the CLR.

Eg:- Serializable is an Attribute.

Usage of Attributes in VB.Net(Sample):

<Serializable()> _
Public Class Employee
Public Name As String
Public Designation As String
End Class



Usage of Attributes in C#.Net(Sample):


[Serializable()]
public class Employee
{
public string Name;
public string Designation;
}


Note: All the attributes are classes that derived from System.Attribute class.


.Net framework has a lot of attributes that can be used for controlling XML serialization, Web services, COM interoperability etc.. And .Net provides the oppertunity to create custom attributes.

Different Methods to Load Assembly Dynamically in .Net


  1. Assembly.LoadFrom : Loads an assembly given its file name or path. Loads the assembly from the specified path, this will not search for the assembly in other directories. If an assembly with the same identity is already loaded, LoadFrom returns the loaded assembly even if a different path was specified.

  2. Assembly.LoadFile : Loads the contents of an assembly file on the specified path.

  3. Assembly.ReflectionOnlyLoad :

  4. Assembly.Load : This method takes the name of the assembly, and the runtime searches for the assembly in different locations. These locations include local directory and global assembly cache.

  5. Assembly.LoadWithPartialName :



This is an incomplete article. I will be back with more details.

Friday, May 10, 2013

Add blog to Google search

You can add your blog to google search by submitting your URL to http://blogsearch.google.com/ping. Here you need to give /atom.xml
Once it is listed by google, you need to continuously update the blog with good articles. Also need to add relevant tags. This will make the blog to be listed in the searches in the toplist.
landscape paintings nature art landscape art sky art illustration art artwork art human art beautiful art landscape prints nature prints sky prints illustration prints artwork prints human prints beautiful prints beautiful special promotions nature special promotions sky special promotions illustration special promotions artwork special promotions beautiful canvas prints beautiful painting canvas prints beautiful framed prints beautiful painting framed prints beautiful posters beautiful painting posters