Click here to Skip to main content
15,879,039 members
Home / Discussions / C#
   

C#

 
GeneralRe: Why ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Member 1228884019-Jan-18 11:30
Member 1228884019-Jan-18 11:30 
GeneralRe: Why ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Pete O'Hanlon19-Jan-18 22:22
mvePete O'Hanlon19-Jan-18 22:22 
GeneralRe: Why ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Member 1228884020-Jan-18 6:59
Member 1228884020-Jan-18 6:59 
GeneralRe: Why ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Pete O'Hanlon20-Jan-18 22:27
mvePete O'Hanlon20-Jan-18 22:27 
QuestionProject Reference Installed Applications Pin
TheCoolTech18-Jan-18 5:32
TheCoolTech18-Jan-18 5:32 
AnswerRe: Project Reference Installed Applications Pin
OriginalGriff18-Jan-18 5:48
mveOriginalGriff18-Jan-18 5:48 
AnswerRe: Project Reference Installed Applications Pin
Richard MacCutchan18-Jan-18 6:40
mveRichard MacCutchan18-Jan-18 6:40 
QuestionCannot convert from ref decimal? to ref decimal Pin
Kevin Marois18-Jan-18 5:30
professionalKevin Marois18-Jan-18 5:30 
I have a base class that sets property values:
<pre>public void SetProperty<T>(string propertyName, ref T propertyField, T value)
{
    if (!Object.Equals(value, propertyField))
    {
        if (OnPropertyChanging(propertyName, propertyField, value))
        {
            IsDirty = true;

            T oldValue = propertyField;
            propertyField = value;

            RaisePropertyChanged(propertyName);
            OnPropertyChanged(propertyName, oldValue, propertyField);
        }
    }
}

I then call it like this:
<pre>private string _CompanyName;
public string CompanyName
{
    get { return _CompanyName; }
    set
    {
        if (_CompanyName != value)
        {
            SetProperty<string>("CompanyName", ref _CompanyName, value);
        }
    }
}

Yet for a nullable property I get a compilation error.
private decimal? _GLRate;
public decimal? GLRate
{
    get { return _GLRate; }
    set
    {
        SetProperty<decimal>("GLRate", ref _GLRate, value);
    }
}
Cannot convert from ref decimal? to ref decimal

I'm guessing it doesn't work with generics??

How can I make this work?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: Cannot convert from ref decimal? to ref decimal Pin
F-ES Sitecore18-Jan-18 6:12
professionalF-ES Sitecore18-Jan-18 6:12 
GeneralRe: Cannot convert from ref decimal? to ref decimal Pin
Kevin Marois18-Jan-18 6:23
professionalKevin Marois18-Jan-18 6:23 
AnswerRe: Cannot convert from ref decimal? to ref decimal Pin
Gerry Schmitz19-Jan-18 7:38
mveGerry Schmitz19-Jan-18 7:38 
QuestionBest Performance Datagrid for WinForms Pin
Burhu18-Jan-18 3:54
professionalBurhu18-Jan-18 3:54 
AnswerRe: Best Performance Datagrid for WinForms Pin
Dave Kreskowiak18-Jan-18 4:42
mveDave Kreskowiak18-Jan-18 4:42 
QuestionC# Remote Desktop Using C# .Net Pin
Babiiii18-Jan-18 2:27
Babiiii18-Jan-18 2:27 
AnswerRe: C# Remote Desktop Using C# .Net Pin
OriginalGriff18-Jan-18 2:30
mveOriginalGriff18-Jan-18 2:30 
QuestionHow can I put an triangle and square shape in the center using c# in image processing Pin
Member 1363007218-Jan-18 0:41
Member 1363007218-Jan-18 0:41 
AnswerRe: How can I put an triangle and square shape in the center using c# in image processing Pin
OriginalGriff18-Jan-18 0:52
mveOriginalGriff18-Jan-18 0:52 
GeneralRe: How can I put an triangle and square shape in the center using c# in image processing Pin
Member 1363007218-Jan-18 1:09
Member 1363007218-Jan-18 1:09 
GeneralRe: How can I put an triangle and square shape in the center using c# in image processing Pin
OriginalGriff18-Jan-18 1:49
mveOriginalGriff18-Jan-18 1:49 
AnswerRe: How can I put an triangle and square shape in the center using c# in image processing Pin
V.18-Jan-18 20:18
professionalV.18-Jan-18 20:18 
QuestionHow to show customer data and order count using EF & LINQ Pin
Mou_kol17-Jan-18 23:52
Mou_kol17-Jan-18 23:52 
AnswerRe: How to show customer data and order count using EF & LINQ Pin
Pete O'Hanlon18-Jan-18 1:08
mvePete O'Hanlon18-Jan-18 1:08 
GeneralRe: How to show customer data and order count using EF & LINQ Pin
Mou_kol18-Jan-18 1:47
Mou_kol18-Jan-18 1:47 
GeneralRe: How to show customer data and order count using EF & LINQ Pin
Richard Deeming18-Jan-18 5:19
mveRichard Deeming18-Jan-18 5:19 
GeneralRe: How to show customer data and order count using EF & LINQ Pin
Mou_kol18-Jan-18 21:05
Mou_kol18-Jan-18 21:05 

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.