You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
906 B
40 lines
906 B
// ========================================================================
|
|
//
|
|
// Copyright (C) 2016-2017 MARC CHEVALDONNE
|
|
// marc.chevaldonne.free.fr
|
|
//
|
|
// Module : Animal.cs
|
|
// Author : Marc Chevaldonné
|
|
// Creation date : 2016-10-07
|
|
//
|
|
// ========================================================================
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
namespace ex_038_004_DataContract_Collections
|
|
{
|
|
[DataContract, KnownType(typeof(Chat)), KnownType(typeof(Chien))]
|
|
class Animal
|
|
{
|
|
[DataMember]
|
|
public string Nom
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[DataMember]
|
|
public string Bruit
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
public Animal(string nom, string bruit)
|
|
{
|
|
Nom = nom;
|
|
Bruit = bruit;
|
|
}
|
|
}
|
|
}
|