Click here to Skip to main content
16,021,905 members
Home / Discussions / C#
   

C#

 
QuestionContextMenu on a MenuItem in ContextMenu possible in WPF? Pin
User 1071954916-Jul-16 4:08
User 1071954916-Jul-16 4:08 
QuestionRe: ContextMenu on a MenuItem in ContextMenu possible in WPF? Pin
User 1106097916-Jul-16 7:53
User 1106097916-Jul-16 7:53 
AnswerRe: ContextMenu on a MenuItem in ContextMenu possible in WPF? Pin
User 1071954918-Jul-16 1:19
User 1071954918-Jul-16 1:19 
GeneralRe: ContextMenu on a MenuItem in ContextMenu possible in WPF? Pin
User 1106097918-Jul-16 1:28
User 1106097918-Jul-16 1:28 
GeneralRe: ContextMenu on a MenuItem in ContextMenu possible in WPF? Pin
User 1071954918-Jul-16 2:02
User 1071954918-Jul-16 2:02 
GeneralRe: ContextMenu on a MenuItem in ContextMenu possible in WPF? Pin
Pete O'Hanlon18-Jul-16 2:18
mvePete O'Hanlon18-Jul-16 2:18 
AnswerRe: ContextMenu on a MenuItem in ContextMenu possible in WPF? Pin
Mycroft Holmes16-Jul-16 13:43
professionalMycroft Holmes16-Jul-16 13:43 
Questionno parameterless constructor defined for this object Pin
Gilbert Consellado15-Jul-16 17:36
professionalGilbert Consellado15-Jul-16 17:36 
I have a class that has no parameters then i will create an object of it and convert it to stream and store it into a dictionary, every thing is fine until i add parameter to the class.

basically i do this.
C#
var classObject = new ClassObject();
dictionary.Add(id, new MemoryStream());
///then add the object stream here to the created storage on the dictioary


then i will just retrieve it like this.
C#
var retriveObject = dictionary[id] as ClassObject;


Now I add a single parameter on that class now using the last code above will produce
Quote:
no parameterless constructor defined for this object


my question, is there way to fix the exception without removing the parameter i added to the class?

Thanks
AnswerRe: no parameterless constructor defined for this object Pin
OriginalGriff15-Jul-16 20:04
mveOriginalGriff15-Jul-16 20:04 
GeneralRe: no parameterless constructor defined for this object Pin
Gilbert Consellado16-Jul-16 0:49
professionalGilbert Consellado16-Jul-16 0:49 
GeneralRe: no parameterless constructor defined for this object Pin
OriginalGriff16-Jul-16 1:48
mveOriginalGriff16-Jul-16 1:48 
GeneralRe: no parameterless constructor defined for this object Pin
Gilbert Consellado16-Jul-16 4:00
professionalGilbert Consellado16-Jul-16 4:00 
GeneralRe: no parameterless constructor defined for this object Pin
OriginalGriff16-Jul-16 4:05
mveOriginalGriff16-Jul-16 4:05 
GeneralRe: no parameterless constructor defined for this object Pin
Gilbert Consellado16-Jul-16 4:30
professionalGilbert Consellado16-Jul-16 4:30 
GeneralRe: no parameterless constructor defined for this object Pin
OriginalGriff16-Jul-16 4:35
mveOriginalGriff16-Jul-16 4:35 
AnswerRe: no parameterless constructor defined for this object Pin
User 1071954916-Jul-16 4:13
User 1071954916-Jul-16 4:13 
GeneralRe: no parameterless constructor defined for this object Pin
Gilbert Consellado16-Jul-16 4:43
professionalGilbert Consellado16-Jul-16 4:43 
QuestionHow to load form's content (Controls in form) from XML file Pin
HoaiTamAnh15-Jul-16 15:50
HoaiTamAnh15-Jul-16 15:50 
AnswerRe: How to load form's content (Controls in form) from XML file Pin
Richard MacCutchan15-Jul-16 21:48
mveRichard MacCutchan15-Jul-16 21:48 
AnswerRe: How to load form's content (Controls in form) from XML file Pin
BillWoodruff16-Jul-16 2:34
professionalBillWoodruff16-Jul-16 2:34 
QuestionManually linking in references Pin
TheOnlyRealTodd14-Jul-16 23:33
professionalTheOnlyRealTodd14-Jul-16 23:33 
AnswerRe: Manually linking in references Pin
OriginalGriff14-Jul-16 23:45
mveOriginalGriff14-Jul-16 23:45 
AnswerRe: Manually linking in references Pin
Eddy Vluggen14-Jul-16 23:58
professionalEddy Vluggen14-Jul-16 23:58 
SuggestionRe: Manually linking in references Pin
maverick199115-Jul-16 22:30
professionalmaverick199115-Jul-16 22:30 
QuestionPassing Memory Stream between C# Windows Pin
sunsher14-Jul-16 18:02
sunsher14-Jul-16 18:02 

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.