<?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>Απ: Ερωτήσεις πάνω στα LINQ Samples (VB.NET 2010)</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/70204.aspx</link><pubDate>Sat, 05 May 2012 23:12:06 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:70204</guid><dc:creator>AlKiS</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/70204.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=72&amp;PostID=70204</wfw:commentRss><description>&lt;p&gt;Στο προηγούμενο thread έχω examples από ένα συσκεκριμένο πράγμα που δεν καταλαβαίνω (άμεσα συσχετισμένο με το "fucntion"). Στο reply αυτό αλλάζει η θεματική ενότητα.&lt;/p&gt;&lt;p&gt;Έχω το sample 31:&lt;/p&gt;&lt;p&gt;&lt;table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#f2f2f2;border:solid 1px #e5e5e5;"&gt;&lt;tr style="vertical-align:top;line-height:normal;"&gt;&lt;td style="width:40px;text-align:right;"&gt;&lt;pre style="font-family:courier new;font-size:11px;color:gray;margin:0px;padding:2px;border-right:solid 1px #e7e7e7;"&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
 &lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style="margin:0px;padding:2px;padding-left:8px;"&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;Public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Sub&lt;/span&gt; Linq31()
        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Dim&lt;/span&gt; words &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; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;String&lt;/span&gt;() {&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"aPPLE"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"AbAcUs"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"bRaNcH"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"BlUeBeRrY"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"ClOvEr"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"cHeRry"&lt;/span&gt;}

        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Dim&lt;/span&gt; sortedWords &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; words.OrderBy(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Function&lt;/span&gt;(word) word, &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;New&lt;/span&gt; CaseInsensitiveComparer())

        ObjectDumper.&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Write&lt;/span&gt;(sortedWords)
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;End&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Sub&lt;/span&gt;
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Class&lt;/span&gt; CaseInsensitiveComparer : &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Implements&lt;/span&gt; IComparer(Of &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;String&lt;/span&gt;)

        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Function&lt;/span&gt; Compare(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ByVal&lt;/span&gt; x &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;As&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;String&lt;/span&gt;, &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;ByVal&lt;/span&gt; y &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;As&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;String&lt;/span&gt;) &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;As&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Integer&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Implements&lt;/span&gt; IComparer(Of &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;String&lt;/span&gt;).Compare
            &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Return&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;String&lt;/span&gt;.Compare(x, y, &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;True&lt;/span&gt;)
        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;End&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Function&lt;/span&gt;
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;End&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Class&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;Ας μην μείνουμε στην 4η σειρά που έχει μέσα του το function. είναι ήδη φανερό ότι έχω πρόβλημα με αυτό.&lt;br&gt;&lt;/p&gt;&lt;p&gt;Πάμε λίγο στην 9η ως 13η σειρά..&lt;/p&gt;&lt;p&gt;Είμαστε ΟΚ μέχρι και το&amp;nbsp;
&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;Public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Class&lt;/span&gt; CaseInsensitiveComparer&lt;/span&gt;
&lt;/p&gt;&lt;p&gt;Μετά όμως, τι είναι αυτή η άνω/κάτω τελεία, το Implements και το IComparer? (δυστυχώς το ότι το Implement σημαίνει υλοποιώ, και το Compare συγκρίνω, δεν με βοηθάν καθόλου..)&lt;/p&gt;&lt;p&gt;όσο για την επόμενη σειρά που μετά το "As Integer" βάζει κιάλλα πράγματα.. εδώ κιαν τάχασα..&lt;/p&gt;</description></item><item><title>Ερωτήσεις πάνω στα LINQ Samples (VB.NET 2010)</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/70201.aspx</link><pubDate>Sat, 05 May 2012 06:46:25 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:70201</guid><dc:creator>AlKiS</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/70201.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=72&amp;PostID=70201</wfw:commentRss><description>&lt;p&gt;Ότι ερωτήσεις έχω πάνω στα LINQ Samples θα τα γράφω εδώ (άρα όσο προχωράω στα samples θα βάζω κι άλλα reply)&lt;/p&gt;&lt;p&gt;Οκ, λοιπόν... κοιτάω αυτή τη σειρά κώδικα από τα LINQ Samples (Νο5) επί ώρα.. κάνω μικρο-αλλαγές... και δεν μπορώ να καταλάβω γιατί δουλεύει!&lt;br&gt;&lt;/p&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;Dim&lt;/span&gt; shortDigits &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; digits.Where(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Function&lt;/span&gt;(digit, index) digit.Length() &amp;lt; index)&lt;/span&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Και πράγματι αναγνωρίζει ποια νούμερα μέσα από το "digits" έχει περισσότερα ψηφία από την τιμή του..&lt;br&gt;&lt;br&gt;μέχρι και το "where" είμαστε ΟΚ. μετά λέει "Funtion" αλλά με περιορίζει στο να βάλω μέσα του είτε [String] είτε [String, Integer] αν και όταν πάω πάνω του λέει &lt;br&gt;[String, Boolean] είτε [String, Integer, Boolean]&lt;br&gt;&lt;br&gt;&lt;br&gt;Μετά, αφήνοντας απόσταση ΔΕΝ με προτρέπει να γράψω τίποτα, και ούτε δείχνει κάτι στο description του.. όμως αν δεν γράψεις σου βγάζει πρόβλημα.&lt;br&gt;Εδώ βλέπουμε γραμμένο το "digit.Length() &amp;lt; index"&lt;br&gt;Θέλει μόνο ονόματα μεταβλητών που ΔΕΝ υπάρχουν - αν υπάρχει η μεταβλητή σου βγάζει πρόβλημα..&lt;br&gt;και η μεταβλητή φυσικά μπορεί να έχει ότι όνομα νάναι..&lt;br&gt;Άρα πως στο καλό κάνει αυτό που κάνει??&lt;br&gt;&lt;br&gt;&lt;p&gt;Όλο το κομμάτι κώδικα είναι αυτό:&lt;/p&gt;&lt;pre&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;    Public Sub Linq5()
        Dim digits &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; New String() {&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"jhghj"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"one"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"two"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"three"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"four"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"-one"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"six"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"seven"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"eight"&lt;/span&gt;, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"nine"&lt;/span&gt;}
 
        Dim shortDigits &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; digits.Where(Function(digit, index) digit.Length() &amp;lt; index)
 
        WriteLine(&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Short digits:"&lt;/span&gt;)
        For Each d In shortDigits
            WriteLine(&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"The word "&lt;/span&gt; &amp;amp; d &amp;amp; &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;" is shorter than its value."&lt;/span&gt;)
        Next
    End Sub&lt;br&gt;&lt;br&gt;&lt;/span&gt;
&lt;p&gt;Sample 12:&lt;/p&gt;&lt;p&gt;δεν καταλαβαίνω ούτε αυτόν τον κώδικα. Δουλεύει, ναι.. αλλά όπως και πριν.. &lt;strong&gt;γιατί&lt;/strong&gt; δουλεύει? δεν μπορώ να αντιληφθώ τι λέει. πως διαβάζεται...&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#f2f2f2;border:solid 1px #e5e5e5;"&gt;&lt;tr style="vertical-align:top;line-height:normal;"&gt;&lt;td style="width:40px;text-align:right;"&gt;&lt;pre style="font-family:courier new;font-size:11px;color:gray;margin:0px;padding:2px;border-right:solid 1px #e7e7e7;"&gt;1
 &lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style="margin:0px;padding:2px;padding-left:8px;"&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;Dim&lt;/span&gt; numsInPlace &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; numbers.&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Select&lt;/span&gt;(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Function&lt;/span&gt;(num, index) &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;New&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;With&lt;/span&gt; {.Num &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; num, .InPlace &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (num &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; index)})&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;ολόκληρος ο κώδικας είναι ο:&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#f2f2f2;border:solid 1px #e5e5e5;"&gt;&lt;tr style="vertical-align:top;line-height:normal;"&gt;&lt;td style="width:40px;text-align:right;"&gt;&lt;pre style="font-family:courier new;font-size:11px;color:gray;margin:0px;padding:2px;border-right:solid 1px #e7e7e7;"&gt;1
2
3
4
5
6
7
8
9
10
 &lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style="margin:0px;padding:2px;padding-left:8px;"&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;Public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Sub&lt;/span&gt; Linq12()
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Dim&lt;/span&gt; numbers &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;As&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Integer&lt;/span&gt;() &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; {5, 4, 1, 3, 9, 8, 6, 7, 2, 0}

    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Dim&lt;/span&gt; numsInPlace &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; numbers.&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Select&lt;/span&gt;(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Function&lt;/span&gt;(num, index) &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;New&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;With&lt;/span&gt; {.Num &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; num, .InPlace &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (num &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; index)})

    Console.WriteLine(&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Number: In-place?"&lt;/span&gt;)
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;For&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Each&lt;/span&gt; n &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;In&lt;/span&gt; numsInPlace
        Console.WriteLine(n.Num &amp;amp; &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;": "&lt;/span&gt; &amp;amp; n.InPlace)
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Next&lt;/span&gt;
&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;End&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Sub&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;και βλέπει αν οι αριθμοί είναι στη σωστή σειρά, και λέει True/False αναλόγως.&lt;/p&gt;&lt;p&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/p&gt;&lt;p&gt;Έχω θέμα και με το Sample 19..&amp;nbsp;&lt;/p&gt;&lt;p&gt;Δεν καταλαβαίνω αυτή τη σειρά:&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#f2f2f2;border:solid 1px #e5e5e5;"&gt;&lt;tr style="vertical-align:top;line-height:normal;"&gt;&lt;td style="width:40px;text-align:right;"&gt;&lt;pre style="font-family:courier new;font-size:11px;color:gray;margin:0px;padding:2px;border-right:solid 1px #e7e7e7;"&gt;1
 &lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style="margin:0px;padding:2px;padding-left:8px;"&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;Dim&lt;/span&gt; customerOrders &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; customerList.SelectMany(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Function&lt;/span&gt;(cust, custIndex) From ord &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;In&lt;/span&gt; cust.Orders &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Select&lt;/span&gt; &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Customer #"&lt;/span&gt; &amp;amp; (custIndex &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;+&lt;/span&gt; 1) &amp;amp; &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;" has an order with OrderID "&lt;/span&gt; &amp;amp; ord.OrderID)&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;ο κώδικας βγάζει σειρές με το εξής pattern: "Customer #{No} has an order with OrderID {OrderIdNum}"&lt;/p&gt;&lt;p&gt;Όλες αυτές οι σειρές υπάρχουν μέσα σε αυτή τη μεταβλητή.. αλλά δεν καταλαβαίνω πως το κάνει.&lt;/p&gt;&lt;p&gt;Ολόκληρος ο κώδικας είναι:&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#f2f2f2;border:solid 1px #e5e5e5;"&gt;&lt;tr style="vertical-align:top;line-height:normal;"&gt;&lt;td style="width:40px;text-align:right;"&gt;&lt;pre style="font-family:courier new;font-size:11px;color:gray;margin:0px;padding:2px;border-right:solid 1px #e7e7e7;"&gt;1
2
3
4
5
6
7
8
9
 &lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style="margin:0px;padding:2px;padding-left:8px;"&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;Public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Sub&lt;/span&gt; Linq19()
        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Dim&lt;/span&gt; customerOrders &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; customerList.SelectMany(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Function&lt;/span&gt;(cust, custIndex) From ord &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;In&lt;/span&gt; cust.Orders &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Select&lt;/span&gt; &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Customer #"&lt;/span&gt; &amp;amp; (custIndex &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;+&lt;/span&gt; 1) &amp;amp; &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;" has an order with OrderID "&lt;/span&gt; &amp;amp; ord.OrderID)

        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;For&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Each&lt;/span&gt; Order &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;In&lt;/span&gt; customerOrders
            Output &amp;amp;= vbCrLf &amp;amp; Order
        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Next&lt;/span&gt;

        WriteLine(Output.Substring(2))
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;End&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br&gt;&lt;/p&gt;&lt;p&gt;Πρόβλημα και με το sample 25.&lt;/p&gt;&lt;p&gt;Γενικά απότι βλέπω, πρόβλημα έχω στα samples που γράφουν μέσα τους το "function". Τα υπόλοιπα είναι απόλυτα κατανοητά...&lt;/p&gt;&lt;p&gt;Αν αλλάξω το function σε Sub, δεν δουλεύει.. άρα το συγκεκριμένο function δεν είναι το ίδιο με αυτό που γράφουμε έξω έτσι? (δλδ με το π.χ. Public Shared Function MyFunction [Byval Var1 as SomeType, Byval Var2 as SomeType, ByRef Var3 As SomeType] )&lt;/p&gt;&lt;p&gt;Συγκεκριμένα το 25 γράφει:&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#f2f2f2;border:solid 1px #e5e5e5;"&gt;&lt;tr style="vertical-align:top;line-height:normal;"&gt;&lt;td style="width:40px;text-align:right;"&gt;&lt;pre style="font-family:courier new;font-size:11px;color:gray;margin:0px;padding:2px;border-right:solid 1px #e7e7e7;"&gt;1
2
3
4
5
6
7
8
9
10
 &lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style="margin:0px;padding:2px;padding-left:8px;"&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;Public&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Sub&lt;/span&gt; Linq25()
        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Dim&lt;/span&gt; numbers() &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;As&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Integer&lt;/span&gt; &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; {5, 4, 1, 3, 9, 8, 6, 7, 2, 0}

        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Dim&lt;/span&gt; firstSmallNumbers &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; numbers.TakeWhile(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Function&lt;/span&gt;(n, index) n &amp;gt;= index)

        WriteLine(&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"First numbers not less than their position:"&lt;/span&gt;)
        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;For&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Each&lt;/span&gt; n &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;In&lt;/span&gt; firstSmallNumbers
            WriteLine(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;CStr&lt;/span&gt;(n))
        &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Next&lt;/span&gt;
    &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;End&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;και όπως πάντα, το πρόβλημά μου βρίσκετε στη σειρά με το "Function":&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#f2f2f2;border:solid 1px #e5e5e5;"&gt;&lt;tr style="vertical-align:top;line-height:normal;"&gt;&lt;td style="width:40px;text-align:right;"&gt;&lt;pre style="font-family:courier new;font-size:11px;color:gray;margin:0px;padding:2px;border-right:solid 1px #e7e7e7;"&gt;1
 &lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style="margin:0px;padding:2px;padding-left:8px;"&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;Dim&lt;/span&gt; firstSmallNumbers &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; numbers.TakeWhile(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;Function&lt;/span&gt;(n, index) n &amp;gt;= index)&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;br&gt;&lt;/span&gt;&lt;/pre&gt;</description></item></channel></rss>