csharp method word first and last letter
<p>i have method, which have parameter "word" returns Word first and the last letter with string. between first and last letter there is three points. example when you write "stackoverflow" it returns it like that "s...w"</p>

<p>I have this code but i wont work.</p>

<pre><code>namespace stackoverflow
{
    class Program
    {
        static void Main(string[] args)
        {
            string word = "stackoverflow";
            string firsLast = FirsLast(word);
            Console.WriteLine(firsLast);
            Console.ReadKey();
        }

        private static string FirsLast(string word)
        {
            string firsLast = "...";
            for (int i = 0; i &lt; word.Length; i += 2)
            {
                firsLast += word.ElementAt(i);
            }
            return firsLast;
        }
    }
}
</code></pre>
