<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>.NET Framework</title><link>https://www.dotnetzone.gr:443/cs/forums/14/ShowForum.aspx</link><description>Θέματα για threading, remoting, reflection, exception handling, security, regex κλπ.</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: Εντοπισμός αν μια virtual μέθοδος έχει γίνει τελικά overriden</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/21286.aspx</link><pubDate>Tue, 28 Nov 2006 02:37:46 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:21286</guid><dc:creator>Νατάσα Μανουσοπούλου</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/21286.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=21286</wfw:commentRss><description>Εδώ υπάρχει το εξής catch: αν η μέθοδος αντί για override είναι new, τότε θα την θεωρήσεις overriden ενώ στην πραγματικότητα δεν είναι. Μπορείς να κάνεις το εξής: Να κάνεις&lt;br&gt;&lt;span style="color: Black;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;t.GetMethod(&lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"test"&lt;/span&gt;, BindingFlags.DeclaredOnly)&lt;/span&gt;&lt;br&gt;για να πάρεις την τυχούσα overriden μέθοδο. Αν επιστρέψει null, τότε δεν είναι overriden. Αν δεν επιστρέψει null, ελέγχεις το &lt;a href="http://msdn2.microsoft.com/en-us/library/system.reflection.methodbase.ishidebysig.aspx"&gt;IsHideBySig&lt;/a&gt; property. Προσοχή όμως, διάβασε το documentation του γιατί έχει διαφορετική συμπεριφορά για VB και C#.&lt;br&gt;</description></item><item><title>Απ: Εντοπισμός αν μια virtual μέθοδος έχει γίνει τελικά overriden</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/21282.aspx</link><pubDate>Tue, 28 Nov 2006 02:12:30 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:21282</guid><dc:creator>Dimitris Papadimitriou</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/21282.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=21282</wfw:commentRss><description>...λέτε να παραμιλάω και στον ύπνο μου και να μην το ξέρω;;!!</description></item><item><title>Απ: Εντοπισμός αν μια virtual μέθοδος έχει γίνει τελικά overriden</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/21281.aspx</link><pubDate>Tue, 28 Nov 2006 02:11:37 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:21281</guid><dc:creator>Dimitris Papadimitriou</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/21281.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=21281</wfw:commentRss><description>ή καλύτερα&lt;br&gt;&lt;span style="color: Black;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;if&lt;/span&gt; (t.GetMethod(&lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"Test"&lt;/span&gt;).DeclaringType == t) ......&lt;/span&gt;&lt;br&gt;</description></item><item><title>Απ: Εντοπισμός αν μια virtual μέθοδος έχει γίνει τελικά overriden</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/21280.aspx</link><pubDate>Tue, 28 Nov 2006 02:06:44 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:21280</guid><dc:creator>Dimitris Papadimitriou</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/21280.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=21280</wfw:commentRss><description>Κάτι βρήκα:&lt;br&gt;
&lt;span style="color: Black;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;MyBaseClass c &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;new&lt;/span&gt; MyDerivedClass();&lt;br /&gt;Type t &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; c.GetType();&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;if&lt;/span&gt; (t.GetMember(&lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"MyVirtualMethod"&lt;/span&gt;)[0].DeclaringType.Name == t.Name)&lt;br /&gt;    &lt;span style="color: Green;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;// method override&lt;/span&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;else&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: Green;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;// method not overriden&lt;/span&gt;&lt;/span&gt;&lt;br&gt;
σωστό;</description></item><item><title>Εντοπισμός αν μια virtual μέθοδος έχει γίνει τελικά overriden</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/21279.aspx</link><pubDate>Tue, 28 Nov 2006 01:57:52 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:21279</guid><dc:creator>Dimitris Papadimitriou</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/21279.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=21279</wfw:commentRss><description>Κάτι μου λέει ότι η απάντηση είναι όχι, αλλά ας το ρωτήσω...&lt;br&gt;Υπάρχει τρόπος, έστω και μεσω reflection, να καταλάβω αν μια κλάση έχει κάνει override μια virtual μέθοδο μιας άλλης κλάσης που κληρονομεί;&lt;br&gt;&lt;br&gt;</description></item></channel></rss>