how to get first and last character from a string C#
Microsoft Net Framework

how to get first and last character from a string C#

 

Solution

 public static string FirstLast(string word)
        {
            return word[0] + "..." + word[word.Length - 1];
        }

Share This with your friend by choosing any social account


Upcoming Articles
You may also read following recent Post
Copyright Future Minutes © 2015- 2024 All Rights Reserved.   Terms of Service  |   Privacy Policy |  Contact US|  Pages|  Whats new?
Update on: Dec 20 2023 05:10 PM