A lot of times i look at tutorials in C sharp and i understand it well , but when it comes to reading a real sample code , i get confused and i could not relate what i have read to a real code.
For example i understand that attributes are used for some kind of tagging and it is also used for deprecating methods.
Now when it comes to looks at a code line for windows phone this :
where this a sample of using sqlite data base in windows phone :How to use SQLite in Windows Phone - Nokia Developer Wiki i don't get what "[PrimaryKey, AutoIncrement]" have to do with the usage of attributes as defined.
Something also like
attribute in other example... i just can't relate the definitions and too simple examples with the real code.
For example i understand that attributes are used for some kind of tagging and it is also used for deprecating methods.
Now when it comes to looks at a code line for windows phone this :
public sealed class Task
{
/// <summary>
/// You can create an integer primary key and let the SQLite control it.
/// </summary>
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public string Title { get; set; }
public string Text { get; set; }
public DateTime CreationDate { get; set; }
public override string ToString()
{
return Title + ":" + Text + " < " + CreationDate.ToShortDateString() + " " + CreationDate.ToShortTimeString();
}
}
where this a sample of using sqlite data base in windows phone :How to use SQLite in Windows Phone - Nokia Developer Wiki i don't get what "[PrimaryKey, AutoIncrement]" have to do with the usage of attributes as defined.
Something also like
Last edited by a moderator: