שפת C: הבדלים בין גרסאות בדף

תוכן שנמחק תוכן שנוסף
אין תקציר עריכה
אין תקציר עריכה
שורה 1:
private string name; // Name of song
private string performer; // Song performer
private int length; // song length in seconds
public Song(string name, string performer, int length)
{
this.name = name;
this.performer = performer;
this.length = length;
}
public Song(Song song1)
{
this.name = song1.GetName();
this.performer = song1.GetPerformer();
this.length = song1.GetLength();
}
 
string sqlCommand = public string GetName()"";
string fileName = {"database.accdb";
string tableName = return this.name"table1";
}
public string GetPerformer()
{
return this.performer;
}
public int GetLength()
{
return this.length;
}
public void SetName(string name)
{
this.name = name;
}
public void SetPerformer(string performer)
{
this.performer = performer;
}
public void SetLength(int length)
{
this.length = length;
}
 
string name = Request["username"];
public void IncreaseLength(int sec)
string gender = { Request["gender"];
string this.lengthpassword += secRequest["password"];
 
}
 
public void DecreaseLength(int sec)
sqlCommand = "INSERT INTO {" + tableName + " (username, upassword, gender) ";
sqlCommand += " VALUES ('" + name + "', '" + password + "', '" + gender + "')";
this.length -= sec;
}//Response.Write(sqlCommand);
public string Category//Response.End();
MyAdoHelper.DoQuery(fileName, sqlCommand);
{
if (this.length< 120)
return "short";
if (this.length > 240)
return "long";
return "average";
}
public string ToString()
{
return "The song name is: " +this.name+" the preformer is: " + this.performer+ " the song length in seconds is: " + length;
}