Using C # to implement features 1

Source: Internet
Author: User

read a lot of C # Rookie tutorial than you start to play code, the final realization of the function one, reference to the online WordCount code discovery whether C + + or C # Most of the method is implemented by the hash table, and would like to only use the loop to iterate through all the characters in the sentence, that is found "" total++, but considering that the number of words in function two becomes a lot, the time is relatively slower, so the hash table is chosen to implement the function. Because it's just a sentence, you just have to split the space in the sentence, but the biggest problem I encountered during the resolution was C:\Users\dell-pc\Desktop\wcc\wcc\Interface1.cs (24,24): Error CS0029: The type "string[" cannot be implicitly converted to "string", which has been solved for a long time -

Here's My Code:

The result of the final implementation is:

Using C # to implement features 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.