<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FDevelopment_Class%2FBuildin_Exceptions</id>
		<title>Csharp/C Sharp/Development Class/Buildin Exceptions - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FDevelopment_Class%2FBuildin_Exceptions"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Development_Class/Buildin_Exceptions&amp;action=history"/>
		<updated>2026-04-30T00:58:00Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Development_Class/Buildin_Exceptions&amp;diff=1187&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Development_Class/Buildin_Exceptions&amp;diff=1187&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:19Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Development_Class/Buildin_Exceptions&amp;diff=1188&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Development_Class/Buildin_Exceptions&amp;diff=1188&amp;oldid=prev"/>
				<updated>2010-05-26T11:43:23Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Argument Null Exception==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
class ArgumentNullTest {&lt;br /&gt;
 public static void Main() {&lt;br /&gt;
   String[] s = null;&lt;br /&gt;
   String sep = &amp;quot; &amp;quot;;&lt;br /&gt;
   try {&lt;br /&gt;
     String j = String.Join(sep,s);&lt;br /&gt;
   }&lt;br /&gt;
   catch (ArgumentNullException e) {&lt;br /&gt;
      Console.WriteLine(&amp;quot;Error: {0}&amp;quot;,e);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==IndexOutOfRangeException Exception==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
   &lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        try&lt;br /&gt;
        {&lt;br /&gt;
            int [] IntegerArray = new int [5];&lt;br /&gt;
   &lt;br /&gt;
            IntegerArray[10] = 123;&lt;br /&gt;
   &lt;br /&gt;
            // wait for user to acknowledge the results&lt;br /&gt;
            Console.WriteLine(&amp;quot;Hit Enter to terminate...&amp;quot;);&lt;br /&gt;
            Console.Read();&lt;br /&gt;
        }&lt;br /&gt;
        catch(IndexOutOfRangeException)&lt;br /&gt;
        {&lt;br /&gt;
            Console.WriteLine(&amp;quot;An invalid element index access was attempted.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==InvalidCastException Exception==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
   &lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        try&lt;br /&gt;
        {&lt;br /&gt;
            MainClass       MyObject = new MainClass();&lt;br /&gt;
            IFormattable    Formattable;&lt;br /&gt;
   &lt;br /&gt;
            Formattable = (IFormattable)MyObject;&lt;br /&gt;
   &lt;br /&gt;
            // wait for user to acknowledge the results&lt;br /&gt;
            Console.WriteLine(&amp;quot;Hit Enter to terminate...&amp;quot;);&lt;br /&gt;
            Console.Read();&lt;br /&gt;
        }&lt;br /&gt;
        catch(InvalidCastException)&lt;br /&gt;
        {&lt;br /&gt;
            Console.WriteLine(&amp;quot;MyObject does not implement the IFormattable interface.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==NullReferenceException Exception==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
   &lt;br /&gt;
class MyClass {&lt;br /&gt;
    public int Value;&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        try&lt;br /&gt;
        {&lt;br /&gt;
            MyClass MyObject = new MyClass();&lt;br /&gt;
            MyObject = null;&lt;br /&gt;
   &lt;br /&gt;
            MyObject.Value = 123;&lt;br /&gt;
   &lt;br /&gt;
            // wait for user to acknowledge the results&lt;br /&gt;
            Console.WriteLine(&amp;quot;Hit Enter to terminate...&amp;quot;);&lt;br /&gt;
            Console.Read();&lt;br /&gt;
        }&lt;br /&gt;
        catch(NullReferenceException)&lt;br /&gt;
        {&lt;br /&gt;
            Console.WriteLine(&amp;quot;Cannot reference a null object.&amp;quot;);&lt;br /&gt;
   &lt;br /&gt;
            // wait for user to acknowledge the results&lt;br /&gt;
            Console.Read();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OutOfMemoryException Exception==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
   &lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        int [] LargeArray;&lt;br /&gt;
   &lt;br /&gt;
        try&lt;br /&gt;
        {&lt;br /&gt;
            LargeArray = new int [2000000000];&lt;br /&gt;
        }&lt;br /&gt;
        catch(OutOfMemoryException)&lt;br /&gt;
        {&lt;br /&gt;
            Console.WriteLine(&amp;quot;The CLR is out of memory.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==OverflowException Exception==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
   &lt;br /&gt;
class MainClass {&lt;br /&gt;
    public static void Main() {&lt;br /&gt;
        try {&lt;br /&gt;
            checked {&lt;br /&gt;
                int Integer1;&lt;br /&gt;
                int Integer2;&lt;br /&gt;
                int Sum;&lt;br /&gt;
   &lt;br /&gt;
                Integer1 = 2000000000;&lt;br /&gt;
                Integer2 = 2000000000;&lt;br /&gt;
                Sum = Integer1 + Integer2;&lt;br /&gt;
            }&lt;br /&gt;
        } catch(OverflowException) {&lt;br /&gt;
            Console.WriteLine(&amp;quot;A mathematical operation caused an overflow.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==StackOverflowException Exception==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
   &lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        try&lt;br /&gt;
        {&lt;br /&gt;
            Recursive();&lt;br /&gt;
        }&lt;br /&gt;
        catch(StackOverflowException)&lt;br /&gt;
        {&lt;br /&gt;
            Console.WriteLine(&amp;quot;The CLR is out of stack space.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
    public static void Recursive()&lt;br /&gt;
    {&lt;br /&gt;
        Recursive();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Throw and Catch an IO exception because the file zxcvb.data doesn&amp;quot;t exist==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System.IO;&lt;br /&gt;
public class IoError {&lt;br /&gt;
  public static void Main() {&lt;br /&gt;
    StreamReader f;&lt;br /&gt;
    try{&lt;br /&gt;
      f = new StreamReader(&amp;quot;DoesNotExist.data&amp;quot;);&lt;br /&gt;
    }catch(IOException e) {&lt;br /&gt;
      System.Console.WriteLine(e);&lt;br /&gt;
    }&lt;br /&gt;
    f = new StreamReader(&amp;quot;DoesNotExist.data&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Throw Argument Out Of Range Exception==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
class Class1 {&lt;br /&gt;
   static void Main(string[] args) {&lt;br /&gt;
    try {&lt;br /&gt;
      // Display the first 200 chars from the connection string&lt;br /&gt;
      Console.WriteLine(&amp;quot;asdf&amp;quot;.Substring(1, 200));&lt;br /&gt;
    }&lt;br /&gt;
    catch (Exception objE) {&lt;br /&gt;
      Console.WriteLine(objE.ToString());&lt;br /&gt;
    }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Throw Index Out Of Range Exception==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
class Class1 {&lt;br /&gt;
   static void Main(string[] args) {&lt;br /&gt;
    long[] longException = new long[2];&lt;br /&gt;
    try {&lt;br /&gt;
      longException[2] = 5;&lt;br /&gt;
    }&lt;br /&gt;
    catch (Exception objE) {&lt;br /&gt;
      Console.WriteLine(objE.ToString());&lt;br /&gt;
    }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Throw Invalid Operation Exception==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
public class InvalidOpExample  {&lt;br /&gt;
  public static void Main()  {&lt;br /&gt;
    int[] array = {0,0};&lt;br /&gt;
    IEnumerator enumerator = array.GetEnumerator();&lt;br /&gt;
    Console.Write(&amp;quot;{0}&amp;quot;,enumerator.Current);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Throw Null reference Exception==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
class Class1 {&lt;br /&gt;
   static void Main(string[] args) {&lt;br /&gt;
    Exception objException = new Exception();&lt;br /&gt;
    try {&lt;br /&gt;
      objException = null;&lt;br /&gt;
      Console.WriteLine(objException.Message);&lt;br /&gt;
    } catch (Exception objE) {&lt;br /&gt;
      Console.WriteLine(objE.ToString());&lt;br /&gt;
    }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>