Click here to Skip to main content
15,886,518 members
Home / Discussions / C#
   

C#

 
GeneralRe: Toggle button in a datatemplate with command binding using MVVM design approach Pin
Kenneth Haugland8-Jan-18 1:08
mvaKenneth Haugland8-Jan-18 1:08 
Questionhow to get alert while working in c# windows application Pin
Member 30804705-Jan-18 23:07
Member 30804705-Jan-18 23:07 
AnswerRe: how to get alert while working in c# windows application Pin
OriginalGriff6-Jan-18 0:55
mveOriginalGriff6-Jan-18 0:55 
AnswerRe: how to get alert while working in c# windows application Pin
BillWoodruff6-Jan-18 2:53
professionalBillWoodruff6-Jan-18 2:53 
AnswerRe: how to get alert while working in c# windows application Pin
Gerry Schmitz6-Jan-18 7:28
mveGerry Schmitz6-Jan-18 7:28 
Questionextending a special case of a generic type Pin
Alexander Kindel5-Jan-18 22:10
Alexander Kindel5-Jan-18 22:10 
GeneralRe: extending a special case of a generic type Pin
harold aptroot5-Jan-18 22:38
harold aptroot5-Jan-18 22:38 
GeneralRe: extending a special case of a generic type Pin
Alexander Kindel5-Jan-18 23:09
Alexander Kindel5-Jan-18 23:09 
"It can pass-through the implementation, it just has to convert back to an IntegerPolynomial in the end." Having the IntegerPolynomial version call the Polynomial<t> version, then convert the result, right?

"Though this requires that Polynomial<integer> is not the base class of IntegerPolynomial, so it's a bit annoying." I had previously encountered the idea that it isn't legal to define a cast from a base class to a derived class - is that what you're referring to here? I'm not sure how or if I could have Polynomial<integer> not be the base class of IntegerPolynomial and still get the code reuse I want, but maybe I could define a method, rather than a cast, that does this conversion:

C#
public IntegerPolynomial getIntegerPolynomial()
{
    List<Integer> coefficients = new List<Integer>();
    foreach (Number coefficient in Coefficients)
        coefficients.Add((Integer)coefficient);
    return new IntegerPolynomial(coefficients);
}


It's kind of gross because I would only ever call it from Polynomial<integer> objects, where the creation of a new List is redundant, but the conversion is necessary for it to count as valid code. Seems like it would work in a pinch though.

modified 6-Jan-18 5:21am.

GeneralRe: extending a special case of a generic type Pin
harold aptroot5-Jan-18 23:34
harold aptroot5-Jan-18 23:34 
GeneralRe: extending a special case of a generic type Pin
Alexander Kindel5-Jan-18 23:37
Alexander Kindel5-Jan-18 23:37 
GeneralRe: extending a special case of a generic type Pin
Alexander Kindel6-Jan-18 2:39
Alexander Kindel6-Jan-18 2:39 
AnswerRe: extending a special case of a generic type Pin
jschell6-Jan-18 6:06
jschell6-Jan-18 6:06 
GeneralRe: extending a special case of a generic type Pin
Alexander Kindel6-Jan-18 8:28
Alexander Kindel6-Jan-18 8:28 
GeneralRe: extending a special case of a generic type Pin
jschell8-Jan-18 14:59
jschell8-Jan-18 14:59 
QuestionProblem with click event of a button on C # Pin
BEN SBAI5-Jan-18 13:41
BEN SBAI5-Jan-18 13:41 
AnswerRe: Problem with click event of a button on C # Pin
Jim Meadors5-Jan-18 16:06
Jim Meadors5-Jan-18 16:06 
AnswerRe: Problem with click event of a button on C # Pin
OriginalGriff5-Jan-18 20:04
mveOriginalGriff5-Jan-18 20:04 
AnswerRe: Problem with click event of a button on C # Pin
BillWoodruff5-Jan-18 21:33
professionalBillWoodruff5-Jan-18 21:33 
GeneralRe: Problem with click event of a button on C # Pin
OriginalGriff5-Jan-18 21:46
mveOriginalGriff5-Jan-18 21:46 
GeneralRe: Problem with click event of a button on C # Pin
BillWoodruff6-Jan-18 2:46
professionalBillWoodruff6-Jan-18 2:46 
QuestionDisabling events of objects stored in array Pin
Pogoodill5-Jan-18 2:32
Pogoodill5-Jan-18 2:32 
AnswerRe: Disabling events of objects stored in array Pin
OriginalGriff5-Jan-18 3:14
mveOriginalGriff5-Jan-18 3:14 
GeneralRe: Disabling events of objects stored in array Pin
Pogoodill5-Jan-18 3:55
Pogoodill5-Jan-18 3:55 
AnswerRe: Disabling events of objects stored in array Pin
OriginalGriff5-Jan-18 4:59
mveOriginalGriff5-Jan-18 4:59 
GeneralRe: Disabling events of objects stored in array Pin
Pogoodill5-Jan-18 6:13
Pogoodill5-Jan-18 6:13 

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.