diff --git a/snippets/csharp/System.Xml.Serialization/XmlSerializer/FromTypes/Project.csproj b/snippets/csharp/System.Xml.Serialization/XmlSerializer/FromTypes/Project.csproj index c02dc5044e7..fc3f09ab482 100644 --- a/snippets/csharp/System.Xml.Serialization/XmlSerializer/FromTypes/Project.csproj +++ b/snippets/csharp/System.Xml.Serialization/XmlSerializer/FromTypes/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net9.0 - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Xml.Serialization/XmlSerializer/FromTypes/source.cs b/snippets/csharp/System.Xml.Serialization/XmlSerializer/FromTypes/source.cs index 7e37b900353..ebcf82ac1b1 100644 --- a/snippets/csharp/System.Xml.Serialization/XmlSerializer/FromTypes/source.cs +++ b/snippets/csharp/System.Xml.Serialization/XmlSerializer/FromTypes/source.cs @@ -25,27 +25,24 @@ public class Test { public static void Main() { - Test t = new Test(); + Test t = new(); t.GetSerializers(); } public void GetSerializers() { // Create an array of types. - Type[]types = new Type[3]; - types[0] = typeof(Instrument); - types[1] = typeof(Player); - types[2] = typeof(Piece); + Type[] types = [typeof(Instrument), typeof(Player), typeof(Piece)]; // Create an array for XmlSerializer objects. - XmlSerializer[]serializers= new XmlSerializer[3]; + XmlSerializer[] serializers = new XmlSerializer[3]; serializers = XmlSerializer.FromTypes(types); // Create one Instrument and serialize it. Instrument i = new Instrument(); i.InstrumentName = "Piano"; // Create a TextWriter to write with. TextWriter writer = new StreamWriter("Inst.xml"); - serializers[0].Serialize(writer,i); + serializers[0].Serialize(writer, i); writer.Close(); } } diff --git a/snippets/visualbasic/System.Xml.Serialization/XmlSerializer/FromTypes/Project.vbproj b/snippets/visualbasic/System.Xml.Serialization/XmlSerializer/FromTypes/Project.vbproj new file mode 100644 index 00000000000..fc3f09ab482 --- /dev/null +++ b/snippets/visualbasic/System.Xml.Serialization/XmlSerializer/FromTypes/Project.vbproj @@ -0,0 +1,8 @@ + + + + Library + net9.0 + + + diff --git a/snippets/visualbasic/System.Xml.Serialization/XmlSerializer/FromTypes/source.vb b/snippets/visualbasic/System.Xml.Serialization/XmlSerializer/FromTypes/source.vb index 2c719b4190a..ca4b02dc6d9 100644 --- a/snippets/visualbasic/System.Xml.Serialization/XmlSerializer/FromTypes/source.vb +++ b/snippets/visualbasic/System.Xml.Serialization/XmlSerializer/FromTypes/source.vb @@ -2,9 +2,8 @@ Imports System.IO Imports System.Xml.Serialization - ' Three classes are included here. Each one will -' be used to create three XmlSerializer objects. +' be used to create three XmlSerializer objects. Public Class Instrument Public InstrumentName As String @@ -19,19 +18,19 @@ Public Class Piece End Class Public Class Test - + Public Shared Sub Main() Dim t As New Test() t.GetSerializers() - End Sub - + End Sub + Public Sub GetSerializers() ' Create an array of types. Dim types(3) As Type types(0) = GetType(Instrument) types(1) = GetType(Player) types(2) = GetType(Piece) - + ' Create an array for XmlSerializer objects. Dim serializers(3) As XmlSerializer serializers = XmlSerializer.FromTypes(types) @@ -45,4 +44,4 @@ Public Class Test End Sub End Class -' \ No newline at end of file +' diff --git a/xml/System.Xml.Serialization/XmlSerializer.xml b/xml/System.Xml.Serialization/XmlSerializer.xml index d21c926e0e3..d757b93dedc 100644 --- a/xml/System.Xml.Serialization/XmlSerializer.xml +++ b/xml/System.Xml.Serialization/XmlSerializer.xml @@ -1897,15 +1897,15 @@ The following example contains two main classes: `PurchaseOrder` and `Test`. The method allows you to efficiently create an array of objects for processing an array of objects. However, it is recommended for callers to cache the returned serializers when there are repeated calls to this method. - +The method allows you to efficiently create an array of objects for processing an array of objects. However, it's recommended for callers to cache the returned serializers when there are repeated calls to this method. ## Examples - The following example uses the method to return an array of objects. The code includes three class definitions that are each used to create an array of objects. - :::code language="csharp" source="~/snippets/csharp/System.Xml.Serialization/XmlSerializer/FromTypes/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Xml.Serialization/XmlSerializer/FromTypes/source.vb" id="Snippet1"::: +The following example uses the method to return an array of objects. The code includes three class definitions that are each used to create an array of objects. + +:::code language="csharp" source="~/snippets/csharp/System.Xml.Serialization/XmlSerializer/FromTypes/source.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/System.Xml.Serialization/XmlSerializer/FromTypes/source.vb" id="Snippet1"::: ]]> diff --git a/xml/System/AppDomain.xml b/xml/System/AppDomain.xml index 666077d4772..40325728556 100644 --- a/xml/System/AppDomain.xml +++ b/xml/System/AppDomain.xml @@ -8821,7 +8821,10 @@ The friendly name of the default application domain is the file name of the proc Occurs when an exception is not caught. - For more information about this API, see Supplemental API remarks for UnhandledException. + + Handlers may be invoked multiple times if exceptions are thrown from different threads. + + For more information about this API, see Supplemental API remarks for UnhandledException. event. It defines an event handler, `MyHandler`, that is invoked whenever an unhandled exception is thrown in the default application domain. It then throws two exceptions. The first is handled by a **try/catch** block. The second is unhandled and invokes the `MyHandle` routine before the application terminates. diff --git a/xml/System/String.xml b/xml/System/String.xml index 48b3fa27db5..2a3f0bd5ad3 100644 --- a/xml/System/String.xml +++ b/xml/System/String.xml @@ -12841,14 +12841,11 @@ Note that the method is called with the `options` argument set to A character that delimits the substrings in this instance. The maximum number of elements expected in the array. A bitwise combination of the enumeration values that specifies whether to trim substrings and include empty substrings. - Splits a string into a maximum number of substrings based on a specified delimiting character and, optionally, options. - Splits a string into a maximum number of substrings based on the provided character separator, optionally omitting empty substrings from the result. + Splits a string into a maximum number of substrings based on the provided character separator, optionally omitting empty substrings from the result. An array that contains at most substrings from this instance that are delimited by .