linux-packaging-mono/external/Newtonsoft.Json/Src/Newtonsoft.Json.Tests/TestObjects/PublicParametizedConstructorWithPropertyNameConflict.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

35 lines
765 B
C#

using System;
namespace Newtonsoft.Json.Tests.TestObjects
{
public class PublicParametizedConstructorWithPropertyNameConflict
{
private readonly int _value;
public PublicParametizedConstructorWithPropertyNameConflict(string name)
{
_value = Convert.ToInt32(name);
}
public int Name
{
get { return _value; }
}
}
public class PublicParametizedConstructorWithPropertyNameConflictWithAttribute
{
private readonly int _value;
public PublicParametizedConstructorWithPropertyNameConflictWithAttribute([JsonProperty("name")]string nameParameter)
{
_value = Convert.ToInt32(nameParameter);
}
public int Name
{
get { return _value; }
}
}
}