Skip to content

Commit e6db941

Browse files
xerifRon Petrusha
authored andcommitted
XmlSerializer.xml — fix cache example (#2152)
* XmlSerializer.xml — fix cache example * Removed unnecessary comma
1 parent 5910ecf commit e6db941

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

xml/System.Xml.Serialization/XmlSerializer.xml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,9 @@ if (ser == null)
169169
ser = new XmlSerializer(typeof(MyClass), myRoot);
170170
// Cache the serializer.
171171
serializers[key] = ser;
172-
}
173-
else
174-
{
175-
// Use the serializer to serialize, or deserialize.
176-
}
172+
}
173+
174+
// Use the serializer to serialize or deserialize.
177175
```
178176
179177
```vb
@@ -195,9 +193,9 @@ If ser Is Nothing Then
195193
ser = New XmlSerializer(GetType([MyClass]), myRoot)
196194
' Cache the serializer.
197195
serializers(key) = ser
198-
Else
199-
' Use the serializer to serialize, or deserialize.
200196
End If
197+
198+
' Use the serializer to serialize or deserialize.
201199
```
202200
203201
## Serialization of ArrayList and Generic List
@@ -2772,4 +2770,4 @@ xmlSerializer mySerializer=new XmlSerializer(typeof(LargeNumbers));
27722770
</Docs>
27732771
</Member>
27742772
</Members>
2775-
</Type>
2773+
</Type>

0 commit comments

Comments
 (0)