NotSupportedException Kelas
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Pengecualian yang dilemparkan ketika metode yang dipanggil tidak didukung, atau ketika ada upaya untuk membaca, mencari, atau menulis ke aliran yang tidak mendukung fungsionalitas yang dipanggil.
public ref class NotSupportedException : Exception
public ref class NotSupportedException : SystemException
public class NotSupportedException : Exception
public class NotSupportedException : SystemException
[System.Serializable]
public class NotSupportedException : SystemException
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class NotSupportedException : SystemException
type NotSupportedException = class
inherit Exception
type NotSupportedException = class
inherit SystemException
[<System.Serializable>]
type NotSupportedException = class
inherit SystemException
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type NotSupportedException = class
inherit SystemException
Public Class NotSupportedException
Inherits Exception
Public Class NotSupportedException
Inherits SystemException
- Warisan
- Warisan
- Turunan
- Atribut
Keterangan
NotSupportedException menunjukkan bahwa tidak ada implementasi untuk metode atau properti yang dipanggil.
NotSupportedException menggunakan HRESULT COR_E_NOTSUPPORTED, yang memiliki nilai 0x80131515.
Untuk daftar nilai properti awal untuk instance NotSupportedException, silakan lihat konstruktor NotSupportedException.
Melempar pengecualian yang disebut NotSupportedException
Anda mungkin mempertimbangkan untuk NotSupportedException melempar pengecualian dalam kasus berikut:
Anda menerapkan antarmuka tujuan umum, dan beberapa metode tidak memiliki implementasi yang bermakna. Misalnya, jika Anda membuat jenis tanggal dan waktu yang mengimplementasikan IConvertible antarmuka, Anda akan memberikan NotSupportedException pengecualian untuk sebagian besar konversi.
Anda telah mewarisi dari kelas abstrak yang mengharuskan Anda mengambil alih beberapa metode. Namun, Anda hanya siap untuk memberikan implementasi untuk sebagian dari ini. Untuk metode yang Anda putuskan untuk tidak diterapkan, Anda dapat memilih untuk melemparkan NotSupportedException.
Anda menentukan jenis tujuan umum dengan status yang memungkinkan operasi secara kondisional. Misalnya, tipe Anda dapat berupa hanya-baca atau baca-tulis. Dalam kasus ini kita dapat:
Jika objek bersifat baca-saja, mencoba menetapkan nilai ke properti instans atau metode panggilan yang memodifikasi status instans harus memberikan NotSupportedException pengecualian.
Anda harus menerapkan properti yang mengembalikan Boolean nilai yang menunjukkan apakah fungsionalitas tertentu tersedia. Misalnya, untuk jenis yang dapat bersifat baca-saja atau baca-tulis, Anda dapat mengimplementasikan
IsReadOnlyproperti yang menunjukkan apakah kumpulan metode baca-tulis tersedia atau tidak tersedia.
Mengelola pengecualian tipe NotSupportedException
Pengecualian NotSupportedException menunjukkan bahwa metode tidak memiliki implementasi dan Anda tidak boleh menyebutnya. Sebaiknya Anda tidak menangani pengecualian. Sebagai gantinya, apa yang harus Anda lakukan tergantung pada penyebab pengecualian: apakah implementasi benar-benar tidak ada, atau pemanggilan anggota tersebut tidak konsisten dengan tujuan objek (seperti panggilan metode FileStream.Write pada objek hanya-baca FileStream).
Implementasi belum disediakan karena operasi tidak dapat dilakukan dengan cara yang bermakna. Ini adalah pengecualian umum ketika Anda memanggil metode pada objek yang menyediakan implementasi untuk metode kelas dasar abstrak, atau yang mengimplementasikan antarmuka tujuan umum, dan metode tidak memiliki implementasi yang bermakna.
Misalnya, Convert kelas mengimplementasikan IConvertible antarmuka, yang berarti harus menyertakan metode untuk mengonversi setiap jenis primitif ke setiap jenis primitif lainnya. Namun, banyak dari konversi tersebut tidak dimungkinkan. Akibatnya, panggilan ke Convert.ToBoolean(DateTime) metode , misalnya, melemparkan NotSupportedException pengecualian karena tidak ada kemungkinan konversi antara dan DateTime nilai Boolean .
Untuk menghilangkan pengecualian, Anda harus menghilangkan panggilan metode.
Panggilan metode tidak didukung mengingat status objek. Anda mencoba memanggil anggota yang fungsionalitasnya tidak tersedia karena status objek. Anda dapat menghilangkan pengecualian dengan salah satu dari tiga cara:
Anda tahu status objek terlebih dahulu, tetapi Anda telah memanggil metode atau properti yang tidak didukung. Dalam hal ini, pemanggilan anggota adalah kesalahan, dan Anda dapat menghilangkannya.
Anda mengetahui status objek terlebih dahulu (biasanya karena kode Anda telah membuat instans), tetapi objek salah dikonfigurasi. Contoh berikut mengilustrasikan masalah ini. Ini membuat objek baca-saja FileStream dan kemudian mencoba menulis ke objek tersebut.
using System; using System.IO; using System.Text; using System.Threading.Tasks; public class Example { public static async Task Main() { Encoding enc = Encoding.Unicode; String value = "This is a string to persist."; Byte[] bytes = enc.GetBytes(value); FileStream fs = new FileStream(@".\TestFile.dat", FileMode.Open, FileAccess.Read); Task t = fs.WriteAsync(enc.GetPreamble(), 0, enc.GetPreamble().Length); Task t2 = t.ContinueWith((a) => fs.WriteAsync(bytes, 0, bytes.Length)); await t2; fs.Close(); } } // The example displays the following output: // Unhandled Exception: System.NotSupportedException: Stream does not support writing. // at System.IO.Stream.BeginWriteInternal(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state // , Boolean serializeAsynchronously) // at System.IO.FileStream.BeginWrite(Byte[] array, Int32 offset, Int32 numBytes, AsyncCallback userCallback, Object sta // teObject) // at System.IO.Stream.<>c.<BeginEndWriteAsync>b__53_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, // Object state) // at System.Threading.Tasks.TaskFactory`1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func`5 beginMet // hod, Func`3 endMethod) // at System.IO.Stream.BeginEndWriteAsync(Byte[] buffer, Int32 offset, Int32 count) // at System.IO.FileStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) // at System.IO.Stream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count) // at Example.Main()open System.IO open System.Text let main = task { let enc = Encoding.Unicode let value = "This is a string to persist." let bytes = enc.GetBytes value let fs = new FileStream(@".\TestFile.dat", FileMode.Open, FileAccess.Read) let t = fs.WriteAsync(enc.GetPreamble(), 0, enc.GetPreamble().Length) let t2 = t.ContinueWith(fun a -> fs.WriteAsync(bytes, 0, bytes.Length)) let! _ = t2 fs.Close() } main.Wait() // The example displays the following output: // Unhandled Exception: System.NotSupportedException: Stream does not support writing. // at System.IO.Stream.BeginWriteInternal(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state // , Boolean serializeAsynchronously) // at System.IO.FileStream.BeginWrite(Byte[] array, Int32 offset, Int32 numBytes, AsyncCallback userCallback, Object sta // teObject) // at System.IO.Stream.<>c.<BeginEndWriteAsync>b__53_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, // Object state) // at System.Threading.Tasks.TaskFactory`1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func`5 beginMet // hod, Func`3 endMethod) // at System.IO.Stream.BeginEndWriteAsync(Byte[] buffer, Int32 offset, Int32 count) // at System.IO.FileStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) // at System.IO.Stream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count) // at <StartupCode:fs>.main()Imports System.IO Imports System.Text Imports System.Threading.Tasks Module Example Public Sub Main() Dim enc As Encoding = Encoding.Unicode Dim value As String = "This is a string to persist." Dim bytes() As Byte = enc.GetBytes(value) Dim fs As New FileStream(".\TestFile.dat", FileMode.Open, FileAccess.Read) Dim t As Task = fs.WriteAsync(enc.GetPreamble(), 0, enc.GetPreamble().Length) Dim t2 As Task = t.ContinueWith(Sub(a) fs.WriteAsync(bytes, 0, bytes.Length)) t2.Wait() fs.Close() End Sub End Module ' The example displays the following output: ' Unhandled Exception: System.NotSupportedException: Stream does not support writing. ' at System.IO.Stream.BeginWriteInternal(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state ' , Boolean serializeAsynchronously) ' at System.IO.FileStream.BeginWrite(Byte[] array, Int32 offset, Int32 numBytes, AsyncCallback userCallback, Object sta ' teObject) ' at System.IO.Stream.<>c.<BeginEndWriteAsync>b__53_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, ' Object state) ' at System.Threading.Tasks.TaskFactory`1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func`5 beginMet ' hod, Func`3 endMethod) ' at System.IO.Stream.BeginEndWriteAsync(Byte[] buffer, Int32 offset, Int32 count) ' at System.IO.FileStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) ' at System.IO.Stream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count) ' at Example.Main()Anda dapat menghilangkan pengecualian dengan memastikan bahwa objek yang dibuat mendukung fungsionalitas yang Anda inginkan. Contoh berikut mengatasi masalah objek baca-saja FileStream dengan memberikan argumen yang benar kepada FileStream.FileStream(String, FileMode, FileAccess) konstruktor.
Anda tidak tahu status objek terlebih dahulu, dan objek tidak mendukung operasi tertentu. Dalam kebanyakan kasus, objek harus menyertakan properti atau metode yang menunjukkan apakah objek mendukung serangkaian operasi tertentu. Anda dapat menghilangkan pengecualian dengan memeriksa nilai objek dan memanggil anggota hanya jika sesuai.
Contoh berikut mendefinisikan metode
DetectEncodingyang melemparkan pengecualian NotSupportedException saat mencoba membaca dari awal stream yang tidak mendukung akses baca.using System; using System.IO; using System.Threading.Tasks; public class TestPropEx1 { public static async Task Main() { String name = @".\TestFile.dat"; var fs = new FileStream(name, FileMode.Create, FileAccess.Write); Console.WriteLine("Filename: {0}, Encoding: {1}", name, await FileUtilities1.GetEncodingType(fs)); } } public class FileUtilities1 { public enum EncodingType { None = 0, Unknown = -1, Utf8 = 1, Utf16 = 2, Utf32 = 3 } public async static Task<EncodingType> GetEncodingType(FileStream fs) { Byte[] bytes = new Byte[4]; int bytesRead = await fs.ReadAsync(bytes, 0, 4); if (bytesRead < 2) return EncodingType.None; if (bytesRead >= 3 & (bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF)) return EncodingType.Utf8; if (bytesRead == 4) { var value = BitConverter.ToUInt32(bytes, 0); if (value == 0x0000FEFF | value == 0xFEFF0000) return EncodingType.Utf32; } var value16 = BitConverter.ToUInt16(bytes, 0); if (value16 == (ushort)0xFEFF | value16 == (ushort)0xFFFE) return EncodingType.Utf16; return EncodingType.Unknown; } } // The example displays the following output: // Unhandled Exception: System.NotSupportedException: Stream does not support reading. // at System.IO.FileStream.BeginRead(Byte[] array, Int32 offset, Int32 numBytes, AsyncCallback callback, Object state) // at System.IO.Stream.<>c.<BeginEndReadAsync>b__46_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, Object state) // at System.Threading.Tasks.TaskFactory`1.FromAsyncTrim[TInstance, TArgs](TInstance thisRef, TArgs args, Func`5 beginMethod, Func`3 endMethod) // at System.IO.Stream.BeginEndReadAsync(Byte[] buffer, Int32 offset, Int32 count) // at System.IO.FileStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) // at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count) // at FileUtilities.GetEncodingType(FileStream fs) in C:\Work\docs\program.cs:line 26 // at Example.Main() in C:\Work\docs\program.cs:line 13 // at Example.<Main>()open System open System.IO module FileUtilities = type EncodingType = | None = 0 | Unknown = -1 | Utf8 = 1 | Utf16 = 2 | Utf32 = 3 let getEncodingType (fs: FileStream) = task { let bytes = Array.zeroCreate<byte> 4 let! bytesRead = fs.ReadAsync(bytes, 0, 4) if bytesRead < 2 then return EncodingType.None elif bytesRead >= 3 && bytes[0] = 0xEFuy && bytes[1] = 0xBBuy && bytes[2] = 0xBFuy then return EncodingType.Utf8 else let value = BitConverter.ToUInt32(bytes, 0) if bytesRead = 4 && (value = 0x0000FEFFu || value = 0xFEFF0000u) then return EncodingType.Utf32 else let value16 = BitConverter.ToUInt16(bytes, 0) if value16 = 0xFEFFus || value16 = 0xFFFEus then return EncodingType.Utf16 else return EncodingType.Unknown } let main _ = task { let name = @".\TestFile.dat" let fs = new FileStream(name, FileMode.Create, FileAccess.Write) let! et = FileUtilities.getEncodingType fs printfn $"Filename: {name}, Encoding: {et}" } // The example displays the following output: // Unhandled Exception: System.NotSupportedException: Stream does not support reading. // at System.IO.FileStream.BeginRead(Byte[] array, Int32 offset, Int32 numBytes, AsyncCallback callback, Object state) // at System.IO.Stream.<>c.<BeginEndReadAsync>b__46_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, Object state) // at System.Threading.Tasks.TaskFactory`1.FromAsyncTrim[TInstance, TArgs](TInstance thisRef, TArgs args, Func`5 beginMethod, Func`3 endMethod) // at System.IO.Stream.BeginEndReadAsync(Byte[] buffer, Int32 offset, Int32 count) // at System.IO.FileStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) // at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count) // at FileUtilities.GetEncodingType(FileStream fs) // at Example.Main() // at Example.<Main>()Imports System.IO Imports System.Threading.Tasks Module Example2 Public Sub Main() Dim name As String = ".\TestFile.dat" Dim fs As New FileStream(name, FileMode.Create, FileAccess.Write) Console.WriteLine("Filename: {0}, Encoding: {1}", name, FileUtilities2.GetEncodingType(fs)) End Sub End Module Public Class FileUtilities2 Public Enum EncodingType As Integer None = 0 Unknown = -1 Utf8 = 1 Utf16 = 2 Utf32 = 3 End Enum Public Shared Function GetEncodingType(fs As FileStream) As EncodingType Dim bytes(3) As Byte Dim t As Task(Of Integer) = fs.ReadAsync(bytes, 0, 4) t.Wait() Dim bytesRead As Integer = t.Result If bytesRead < 2 Then Return EncodingType.None If bytesRead >= 3 And (bytes(0) = &HEF AndAlso bytes(1) = &HBB AndAlso bytes(2) = &HBF) Then Return EncodingType.Utf8 End If If bytesRead = 4 Then Dim value As UInteger = BitConverter.ToUInt32(bytes, 0) If value = &HFEFF Or value = &HFEFF0000 Then Return EncodingType.Utf32 End If End If Dim value16 As UInt16 = BitConverter.ToUInt16(bytes, 0) If value16 = &HFEFF Or value16 = &HFFFE Then Return EncodingType.Utf16 End If Return EncodingType.Unknown End Function End Class ' The example displays the following output: ' Unhandled Exception: System.NotSupportedException: Stream does not support reading. ' at System.IO.Stream.BeginReadInternal(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state, ' Boolean serializeAsynchronously) ' at System.IO.FileStream.BeginRead(Byte[] array, Int32 offset, Int32 numBytes, AsyncCallback userCallback, Object stat ' eObject) ' at System.IO.Stream.<>c.<BeginEndReadAsync>b__43_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, O ' bject state) ' at System.Threading.Tasks.TaskFactory`1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func`5 beginMet ' hod, Func`3 endMethod) ' at System.IO.Stream.BeginEndReadAsync(Byte[] buffer, Int32 offset, Int32 count) ' at System.IO.FileStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) ' at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count) ' at FileUtilities2.GetEncodingType(FileStream fs) ' at Example.Main()Anda dapat mengatasi pengecualian dengan memeriksa nilai properti FileStream.CanRead dan keluar dari metode jika aliran bersifat baca-saja.
public static async Task<EncodingType> GetEncodingType(FileStream fs) { if (!fs.CanRead) return EncodingType.Unknown; Byte[] bytes = new Byte[4]; int bytesRead = await fs.ReadAsync(bytes, 0, 4); if (bytesRead < 2) return EncodingType.None; if (bytesRead >= 3 & (bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF)) return EncodingType.Utf8; if (bytesRead == 4) { var value = BitConverter.ToUInt32(bytes, 0); if (value == 0x0000FEFF | value == 0xFEFF0000) return EncodingType.Utf32; } var value16 = BitConverter.ToUInt16(bytes, 0); if (value16 == (ushort)0xFEFF | value16 == (ushort)0xFFFE) return EncodingType.Utf16; return EncodingType.Unknown; } } // The example displays the following output: // Filename: .\TestFile.dat, Encoding: Unknownlet getEncodingType (fs: FileStream) = task { if not fs.CanRead then return EncodingType.Unknown else let bytes = Array.zeroCreate<byte> 4 let! bytesRead = fs.ReadAsync(bytes, 0, 4) if bytesRead < 2 then return EncodingType.None elif bytesRead >= 3 && bytes[0] = 0xEFuy && bytes[1] = 0xBBuy && bytes[2] = 0xBFuy then return EncodingType.Utf8 else let value = BitConverter.ToUInt32(bytes, 0) if bytesRead = 4 && (value = 0x0000FEFFu || value = 0xFEFF0000u) then return EncodingType.Utf32 else let value16 = BitConverter.ToUInt16(bytes, 0) if value16 = 0xFEFFus || value16 = 0xFFFEus then return EncodingType.Utf16 else return EncodingType.Unknown } // The example displays the following output: // Filename: .\TestFile.dat, Encoding: UnknownPublic Class FileUtilities3 Public Enum EncodingType As Integer None = 0 Unknown = -1 Utf8 = 1 Utf16 = 2 Utf32 = 3 End Enum Public Shared Function GetEncodingType(fs As FileStream) As EncodingType If Not fs.CanRead Then Return EncodingType.Unknown End If Dim bytes(3) As Byte Dim t As Task(Of Integer) = fs.ReadAsync(bytes, 0, 4) t.Wait() Dim bytesRead As Integer = t.Result If bytesRead < 2 Then Return EncodingType.None If bytesRead >= 3 And (bytes(0) = &HEF AndAlso bytes(1) = &HBB AndAlso bytes(2) = &HBF) Then Return EncodingType.Utf8 End If If bytesRead = 4 Then Dim value As UInteger = BitConverter.ToUInt32(bytes, 0) If value = &HFEFF Or value = &HFEFF0000 Then Return EncodingType.Utf32 End If End If Dim value16 As UInt16 = BitConverter.ToUInt16(bytes, 0) If value16 = &HFEFF Or value16 = &HFFFE Then Return EncodingType.Utf16 End If Return EncodingType.Unknown End Function End Class ' The example displays the following output: ' Filename: .\TestFile.dat, Encoding: Unknown
Jenis pengecualian terkait
Pengecualian NotSupportedException terkait erat dengan dua jenis pengecualian lainnya:
-
Pengecualian ini dilemparkan ketika metode dapat diimplementasikan tetapi tidak, baik karena anggota akan diimplementasikan dalam versi yang lebih baru, anggota tidak tersedia di platform tertentu, atau anggota termasuk dalam kelas abstrak dan kelas turunan harus memberikan implementasi.
-
Pengecualian ini dilemparkan dalam skenario di mana umumnya kadang-kadang mungkin bagi objek untuk melakukan operasi yang diminta, dan status objek menentukan apakah operasi dapat dilakukan.
Konstruktor
| Nama | Deskripsi |
|---|---|
| NotSupportedException() |
Menginisialisasi instans NotSupportedException baru kelas, mengatur Message properti instans baru ke pesan yang disediakan sistem yang menjelaskan kesalahan. Pesan ini memperhitungkan budaya sistem saat ini. |
| NotSupportedException(SerializationInfo, StreamingContext) |
Kedaluwarsa.
Menginisialisasi instans NotSupportedException baru kelas dengan data berseri. |
| NotSupportedException(String, Exception) |
Menginisialisasi instans NotSupportedException baru kelas dengan pesan kesalahan tertentu dan referensi ke pengecualian dalam yang merupakan penyebab pengecualian ini. |
| NotSupportedException(String) |
Menginisialisasi instans baru kelas NotSupportedException dengan pesan kesalahan tertentu. |
Properti
| Nama | Deskripsi |
|---|---|
| Data |
Mendapatkan kumpulan pasangan kunci/nilai yang memberikan informasi tambahan yang ditentukan pengguna tentang pengecualian. (Diperoleh dari Exception) |
| HelpLink |
Mendapatkan atau mengatur tautan ke file bantuan yang terkait dengan pengecualian ini. (Diperoleh dari Exception) |
| HResult |
Mendapatkan atau mengatur HRESULT, nilai numerik berkode yang ditetapkan ke pengecualian tertentu. (Diperoleh dari Exception) |
| InnerException |
Mendapatkan instans Exception yang menyebabkan pengecualian saat ini. (Diperoleh dari Exception) |
| Message |
Mendapatkan pesan yang menjelaskan pengecualian saat ini. (Diperoleh dari Exception) |
| Source |
Mendapatkan atau mengatur nama aplikasi atau objek yang menyebabkan kesalahan. (Diperoleh dari Exception) |
| StackTrace |
Mendapatkan representasi string dari bingkai langsung pada tumpukan panggilan. (Diperoleh dari Exception) |
| TargetSite |
Mendapatkan metode yang melemparkan pengecualian saat ini. (Diperoleh dari Exception) |
Metode
| Nama | Deskripsi |
|---|---|
| Equals(Object) |
Menentukan apakah objek yang ditentukan sama dengan objek saat ini. (Diperoleh dari Object) |
| GetBaseException() |
Ketika ditimpa di kelas turunan, mengembalikan Exception yang merupakan akar penyebab dari satu atau beberapa pengecualian berikutnya. (Diperoleh dari Exception) |
| GetHashCode() |
Berfungsi sebagai fungsi hash default. (Diperoleh dari Object) |
| GetObjectData(SerializationInfo, StreamingContext) |
Kedaluwarsa.
Saat ditimpa di kelas turunan, mengatur SerializationInfo dengan informasi tentang pengecualian. (Diperoleh dari Exception) |
| GetType() |
Mendapatkan jenis runtime instans saat ini. (Diperoleh dari Exception) |
| MemberwiseClone() |
Membuat salinan dangkal dari Objectsaat ini. (Diperoleh dari Object) |
| ToString() |
Membuat dan mengembalikan representasi string dari pengecualian saat ini. (Diperoleh dari Exception) |
Acara
| Nama | Deskripsi |
|---|---|
| SerializeObjectState |
Kedaluwarsa.
Terjadi ketika pengecualian diserialisasikan untuk membuat objek status pengecualian yang berisi data berseri tentang pengecualian. (Diperoleh dari Exception) |