Delete Chapter17a source code file
DELETE
src/Chapter17a/Chapter17a.csproj
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp3.0</TargetFramework>
- <ProductName>Chapter17a</ProductName>
- <StartupObject>AddisonWesley.Michaelis.EssentialCSharp.Shared.Program</StartupObject>
- <Nullable>enable</Nullable>
- <LangVersion>8.0</LangVersion>
- </PropertyGroup>
- <Import Project="..\Versioning.targets" />
- <ItemGroup>
- <Compile Include="..\Shared\Program.cs">
- <Link>Program.cs</Link>
- </Compile>
- </ItemGroup>
-</Project>
\ No newline at end of file

DELETE
src/Chapter17a/Listing17.27.BackwardCompatibilityPriorToThe2.0Framework.cs
-namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter17.Listing17_27
-{
- using System;
- using System.Runtime.Serialization;
-
- [Serializable]
- public class VersionableDocument : ISerializable
- {
- enum Field
- {
- Title,
- Author,
- Data,
- }
-
- public VersionableDocument()
- {
- }
-
- public string Title;
- public string Author;
- public string Data;
-
- #region ISerializable Members
- public void GetObjectData(
- SerializationInfo info, StreamingContext context)
- {
- info.AddValue(Field.Title.ToString(), Title);
- info.AddValue(Field.Author.ToString(), Author);
- info.AddValue(Field.Data.ToString(), Data);
- }
- public VersionableDocument(
- SerializationInfo info, StreamingContext context)
- {
- foreach(SerializationEntry entry in info)
- {
- switch((Field)Enum.Parse(typeof(Field), entry.Name))
- {
- case Field.Title:
- Title = info.GetString(
- Field.Title.ToString());
- break;
- case Field.Author:
- Author = info.GetString(
- Field.Author.ToString());
- break;
- case Field.Data:
- Data = info.GetString(
- Field.Data.ToString());
- break;
- }
- }
- }
- #endregion
- }
-}
\ No newline at end of file

Delete Chapter17a source code file