@@ -8,27 +8,27 @@ namespace Samples1
8
8
[ Serializable ]
9
9
public class Book : ISerializable
10
10
{
11
- private readonly string _Text ;
11
+ private readonly string _Title ;
12
12
13
- public Book ( string text )
13
+ public Book ( string title )
14
14
{
15
- if ( text == null )
16
- throw new ArgumentNullException ( "text " ) ;
15
+ if ( title == null )
16
+ throw new ArgumentNullException ( "title " ) ;
17
17
18
- _Text = text ;
18
+ _Title = title ;
19
19
}
20
20
21
21
protected Book ( SerializationInfo info , StreamingContext context )
22
22
{
23
23
if ( info == null )
24
24
throw new ArgumentNullException ( "info" ) ;
25
25
26
- _Text = info . GetString ( "Text " ) ;
26
+ _Title = info . GetString ( "Title " ) ;
27
27
}
28
28
29
- public string Text
29
+ public string Title
30
30
{
31
- get { return _Text ; }
31
+ get { return _Title ; }
32
32
}
33
33
34
34
[ SecurityPermission ( SecurityAction . Demand , SerializationFormatter = true ) ]
@@ -37,7 +37,7 @@ public void GetObjectData(SerializationInfo info, StreamingContext context)
37
37
if ( info == null )
38
38
throw new ArgumentNullException ( "info" ) ;
39
39
40
- info . AddValue ( "Text " , _Text ) ;
40
+ info . AddValue ( "Title " , _Title ) ;
41
41
}
42
42
}
43
43
@@ -47,8 +47,8 @@ public class LibraryBook : Book
47
47
{
48
48
private readonly DateTime _CheckedOut ;
49
49
50
- public LibraryBook ( string text , DateTime checkedOut )
51
- : base ( text )
50
+ public LibraryBook ( string title , DateTime checkedOut )
51
+ : base ( title )
52
52
{
53
53
_CheckedOut = checkedOut ;
54
54
}
0 commit comments