<?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>Πρώτα Βήματα - Αρχές προγραμματισμού</title><link>https://www.dotnetzone.gr:443/cs/forums/72/ShowForum.aspx</link><description>Αναρωτιέστε τι σημαίνει object; Class; Inheritance; Design pattern; Την απάντηση μπορείτε να την βρείτε εδώ!</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: Converting a string to an enum</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/56490.aspx</link><pubDate>Tue, 19 Jan 2010 20:13:12 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:56490</guid><dc:creator>Dimitris Papadimitriou</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/56490.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=72&amp;PostID=56490</wfw:commentRss><description>&lt;P&gt;Δεν καταλαβαίνω. Γράφεις το ίδιο πράγμα δυο φορές.&lt;/P&gt;</description></item><item><title>Απ: Converting a string to an enum</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/56485.aspx</link><pubDate>Tue, 19 Jan 2010 08:00:09 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:56485</guid><dc:creator>infamous</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/56485.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=72&amp;PostID=56485</wfw:commentRss><description>έτσι το σκέφτηκα αλλά αυτό που με προβλημάτισε είναι &lt;br&gt;&lt;pre&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;enum&lt;/span&gt; orgs { DEH, OTE, DEYAK }&lt;/span&gt;&lt;/pre&gt;&lt;br&gt;έχουμε το enum orgs&lt;br&gt;&lt;br&gt;και μετά βάζω αυτό των κώδικα&lt;br&gt;&lt;pre&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;string&lt;/span&gt; myOrg &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (textBox1.Text);
            
            orgs myorg &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (orgs)Enum.Parse(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;typeof&lt;/span&gt;(orgs), myOrg);&lt;/span&gt;&lt;/pre&gt;εφόσον το myOrg γίνεται enum δεν θα έπρεπε να μπορούσα να αναφερθώ σε αυτό με τον τύπο&lt;br&gt;&lt;pre&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;string&lt;/span&gt; myOrg &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (textBox1.Text);
            
            orgs myorg &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (orgs)Enum.Parse(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;typeof&lt;/span&gt;(orgs), myOrg);&lt;/span&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>Απ: Converting a string to an enum</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/56476.aspx</link><pubDate>Mon, 18 Jan 2010 22:39:21 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:56476</guid><dc:creator>Dimitris Papadimitriou</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/56476.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=72&amp;PostID=56476</wfw:commentRss><description>&lt;P&gt;Παράδειγμα: υπάρχει το enum KnownColors που περιέχει χρώματα. π.χ. KnownColors.Red (παραλληλισμοί με ομάδες και κόμματα είναι εντελώς ατυχείς). Αν έχεις ένα configuration αρχείο (ή ένα column σε μια βάση)&amp;nbsp;στο οποίο αποθηκεύεις ένα χρώμα που έχει επιλέξει ο χρήστης σου, προφανώς το αποθηκεύεις σαν string π.χ. "Red". Όταν θα έρθει όμως η στιγμή να χρησιμοποιήσεις αυτή την τιμή σε μια συνάρτηση που δέχεται KnownColors enum, θα πρέπει να μετατρέξεις το string σε enum value με τον κώδικα που έγραψες.&lt;/P&gt;</description></item><item><title>Απ: Converting a string to an enum</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/56472.aspx</link><pubDate>Mon, 18 Jan 2010 09:27:09 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:56472</guid><dc:creator>object+</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/56472.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=72&amp;PostID=56472</wfw:commentRss><description>Σε καποιο&amp;nbsp;serialization, reflection τετοια πραματα.</description></item><item><title>Converting a string to an enum</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/56461.aspx</link><pubDate>Sun, 17 Jan 2010 05:06:55 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:56461</guid><dc:creator>infamous</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/56461.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=72&amp;PostID=56461</wfw:commentRss><description>Καθώς διάβαζα για τα enums στο τέλος έκανα μία αναφορά σε αυτό&lt;br&gt;&lt;br&gt;ο κώδικας χρήσης&lt;pre&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;( enumerationType )Enum.Parse(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;typeof&lt;/span&gt;( enumerationType ), enumerationValueString );&lt;/span&gt;&lt;/pre&gt;το παραδειγματάκι του&lt;br&gt;&lt;pre&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;string&lt;/span&gt; myString &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; “north”;
orientation myDirection &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (orientation)Enum.Parse(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;typeof&lt;/span&gt;(orientation),&lt;/span&gt;&lt;/pre&gt;η απορία μου σε τι θα μπορούσε να μας βοηθήσει αυτή η μετατροπή&lt;br&gt;&lt;br&gt;</description></item></channel></rss>