Ruben
New member
- Joined
- Jan 26, 2013
- Messages
- 2
- Programming Experience
- Beginner
Hello,
It's the 1st time that i'm programming in C # and have a class Shelfbooks derived from this class Shelves and i want to pass what is in this class Shelfbooks (books properties like name, title...) to the class Shelves.
Help please ...
Regards to all
It's the 1st time that i'm programming in C # and have a class Shelfbooks derived from this class Shelves and i want to pass what is in this class Shelfbooks (books properties like name, title...) to the class Shelves.
class Shelfbooks : Shelves { Document[] shelf; private int val; public int Val { get { return val; } set { val = value; } } public Shelfbooks(int val) { shelf = new Document[val]; } public void InsereBooks(Document L) { int cont = 0, i; for (i = 0; i < shelf.Length; i++) { if (shelf[i] == L) { cont++; break; } if (shelf[i] == null) break; } if (cont == 0) shelf[i] = L; } } class Shelfves { string[] shelfves; public Shelves() { } public Shelves(int val) { shelves = new string[val]; } }
Help please ...
Regards to all
Last edited by a moderator: