<?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%2FLanguage_Basics%2Fthrow</id>
		<title>Csharp/C Sharp/Language Basics/throw - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FLanguage_Basics%2Fthrow"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Language_Basics/throw&amp;action=history"/>
		<updated>2026-04-29T23:47:40Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Language_Basics/throw&amp;diff=690&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/Language_Basics/throw&amp;diff=690&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:18Z</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/Language_Basics/throw&amp;diff=691&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Language_Basics/throw&amp;diff=691&amp;oldid=prev"/>
				<updated>2010-05-26T11:39:31Z</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;==Exception Translation: CLR catches an exception and rethrows a different exception. The inner exception contains the original 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.Reflection;&lt;br /&gt;
&lt;br /&gt;
public class MyClass {&lt;br /&gt;
    public static void MethodA() {&lt;br /&gt;
        Console.WriteLine(&amp;quot;MyClass.MethodA&amp;quot;);&lt;br /&gt;
        throw new Exception(&amp;quot;MethodA exception&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
public class Starter {&lt;br /&gt;
    public static void Main() {&lt;br /&gt;
        try {&lt;br /&gt;
            Type zType = typeof(MyClass);&lt;br /&gt;
            MethodInfo method = zType.GetMethod(&amp;quot;MethodA&amp;quot;);&lt;br /&gt;
            method.Invoke(null, null);&lt;br /&gt;
        } catch (Exception except) {&lt;br /&gt;
            Console.WriteLine(except.Message);&lt;br /&gt;
            Console.WriteLine(&amp;quot;original: &amp;quot; + except.InnerException.Message);&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 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 ExceptionThrower {&lt;br /&gt;
    static void MethodOne() {&lt;br /&gt;
        try {&lt;br /&gt;
            MethodTwo();&lt;br /&gt;
        } finally { }&lt;br /&gt;
    }&lt;br /&gt;
    static void MethodTwo() {&lt;br /&gt;
        throw new Exception(&amp;quot;Exception Thrown in Method Two&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    public static void Main(String[] args) {&lt;br /&gt;
        try {&lt;br /&gt;
            ExceptionThrower FooBar = new ExceptionThrower();&lt;br /&gt;
            MethodOne();&lt;br /&gt;
        } catch (Exception e) {&lt;br /&gt;
            Console.WriteLine(e.Message);&lt;br /&gt;
        } finally {&lt;br /&gt;
            // Cleanup code&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 exception from getter==&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;
public class MyValue {&lt;br /&gt;
    public String Name;&lt;br /&gt;
}&lt;br /&gt;
class CardDeck {&lt;br /&gt;
    private MyValue[] Cards = new MyValue[52];&lt;br /&gt;
    public MyValue GetCard(int idx) {&lt;br /&gt;
        if ((idx &amp;gt;= 0) &amp;amp;&amp;amp; (idx &amp;lt;= 51))&lt;br /&gt;
            return Cards[idx];&lt;br /&gt;
        else&lt;br /&gt;
            throw new IndexOutOfRangeException(&amp;quot;Invalid Card&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    public static void Main(String[] args) {&lt;br /&gt;
        try {&lt;br /&gt;
            CardDeck PokerDeck = new CardDeck();&lt;br /&gt;
            MyValue HiddenAce = PokerDeck.GetCard(53);&lt;br /&gt;
        } catch (IndexOutOfRangeException e) {&lt;br /&gt;
            Console.WriteLine(e.Message);&lt;br /&gt;
        } catch (Exception e) {&lt;br /&gt;
            Console.WriteLine(e.Message);&lt;br /&gt;
        } finally {&lt;br /&gt;
            // Cleanup code&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>