Click here to Skip to main content
15,888,340 members
Home / Discussions / C#
   

C#

 
GeneralRe: best explanation of using C# 'virtual, or 'abstract methods ... for beginners in the language Pin
BillWoodruff18-Nov-15 0:34
professionalBillWoodruff18-Nov-15 0:34 
AnswerRe: best explanation of using C# 'virtual, or 'abstract methods ... for beginners in the language Pin
OriginalGriff16-Nov-15 5:42
mveOriginalGriff16-Nov-15 5:42 
AnswerRe: best explanation of using C# 'virtual, or 'abstract methods ... for beginners in the language Pin
Gerry Schmitz16-Nov-15 18:28
mveGerry Schmitz16-Nov-15 18:28 
QuestionHow can I fill a Combobox while writing? Pin
Member 1191673515-Nov-15 23:56
Member 1191673515-Nov-15 23:56 
AnswerMessage Closed Pin
16-Nov-15 0:09
professionalPANKAJMAURYA16-Nov-15 0:09 
GeneralRe: How can I fill a Combobox while writing? Pin
John Torjo16-Nov-15 0:18
professionalJohn Torjo16-Nov-15 0:18 
AnswerRe: How can I fill a Combobox while writing? Pin
John Torjo16-Nov-15 0:16
professionalJohn Torjo16-Nov-15 0:16 
GeneralRe: How can I fill a Combobox while writing? Pin
Member 1191673518-Nov-15 1:47
Member 1191673518-Nov-15 1:47 
GeneralRe: How can I fill a Combobox while writing? Pin
John Torjo18-Nov-15 2:10
professionalJohn Torjo18-Nov-15 2:10 
AnswerRe: How can I fill a Combobox while writing? Pin
PANKAJMAURYA16-Nov-15 0:25
professionalPANKAJMAURYA16-Nov-15 0:25 
GeneralRe: How can I fill a Combobox while writing? Pin
Member 1191673518-Nov-15 2:08
Member 1191673518-Nov-15 2:08 
GeneralRe: How can I fill a Combobox while writing? Pin
PANKAJMAURYA18-Nov-15 17:19
professionalPANKAJMAURYA18-Nov-15 17:19 
Questioncall an api in c# Pin
Member 1212120115-Nov-15 21:25
Member 1212120115-Nov-15 21:25 
AnswerRe: call an api in c# Pin
OriginalGriff15-Nov-15 21:44
mveOriginalGriff15-Nov-15 21:44 
AnswerRe: call an api in c# Pin
Afzaal Ahmad Zeeshan16-Nov-15 2:19
professionalAfzaal Ahmad Zeeshan16-Nov-15 2:19 
AnswerRe: call an api in c# Pin
Dave Kreskowiak16-Nov-15 4:06
mveDave Kreskowiak16-Nov-15 4:06 
AnswerRe: call an api in c# Pin
Pete O'Hanlon16-Nov-15 5:51
mvePete O'Hanlon16-Nov-15 5:51 
GeneralRe: call an api in c# Pin
Member 1212120116-Nov-15 17:50
Member 1212120116-Nov-15 17:50 
AnswerRe: call an api in c# Pin
Gerry Schmitz16-Nov-15 18:40
mveGerry Schmitz16-Nov-15 18:40 
QuestionDocument to represent a document node in a print queue Pin
Tridip Bhattacharjee14-Nov-15 1:08
professionalTridip Bhattacharjee14-Nov-15 1:08 
AnswerRe: Document to represent a document node in a print queue Pin
OriginalGriff14-Nov-15 1:21
mveOriginalGriff14-Nov-15 1:21 
QuestionPrint Queue implementation by linked list class Pin
Tridip Bhattacharjee14-Nov-15 1:06
professionalTridip Bhattacharjee14-Nov-15 1:06 
AnswerRe: Print Queue implementation by linked list class Pin
OriginalGriff14-Nov-15 1:20
mveOriginalGriff14-Nov-15 1:20 
Start by creating your PrintQueue class - add a private Head variable which is a Document. Add a Next property to your Document class which is also a Document. This allows you to create the linked list.

And add the Push and Pop methods (though I wouldn't call them that myself because "push" and "pop" have specific meanings in computing, and I'd expect a Push followed by a Pop to return the document I Pushed, not the first in the list - I'd use GetHead and AddTail instead myself).

Since this is your homework, I'll not give you the code - it's pretty simple anyway - but for Push, just traverse the list until you find a null value Next, and set your new document there.
For Pop, check if there are any items in the Head, and remove it to a temporary variable, setting the value of Head to the Next value of the Document you removed. Set the Next value of the temporary value to null, and return the temporary value.

I'd suspect that you want the Document class to be abstract as well.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

GeneralRe: Print Queue implementation by linked list class Pin
Tridip Bhattacharjee14-Nov-15 5:12
professionalTridip Bhattacharjee14-Nov-15 5:12 
GeneralRe: Print Queue implementation by linked list class Pin
OriginalGriff14-Nov-15 5:29
mveOriginalGriff14-Nov-15 5:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.