Results 1 to 6 of 6

Thread: Count of a letter in a file *HELP*

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2018
    Posts
    2

    Unhappy Count of a letter in a file *HELP*

    Hi, new here and new to coding.

    I need some coding help with the following:

    Instructions

    Button event
    A masked textbox to input a letter
    A dialog box to open the text file
    Use exception handling
    read in via streamreader
    Output to a textbox:
    There are 2000 A's in the states.txt file.

    I'm stuck, I don't know what to do. This is all I know:

    For 0 to Stringline.length - 1
    If "ABCDabcdABCD".Substring(0,1) = 'letter' Then
    counter = counter + 1

    Do loop


    States.txt

  2. #2
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,140

    Re: Count of a letter in a file *HELP*

    Based on the wording of the assignment and the code snippet you posted, this appears to be a VB.NET related question, so I will ask it to be moved to the VB.NET forum.

    You are likely going to need to show more code than that to get assistance to demonstrate at least a cursory understanding of the concepts involved with the assignment. No one here seems too keen to just do other people's homework for them.

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2018
    Posts
    2

    Re: Count of a letter in a file *HELP*

    Quote Originally Posted by OptionBase1 View Post
    You are likely going to need to show more code than that to get assistance to demonstrate at least a cursory understanding of the concepts involved with the assignment. No one here seems too keen to just do other people's homework for them.
    Maybe I'll get lucky...

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Count of a letter in a file *HELP*

    Lookup .IndexOf

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,348

    Re: Count of a letter in a file *HELP*

    I suggest that you review the notes and/or text book for the class because you're not going to be asked to use those things without having been introduced to them. Asking strangers on the internet to cheat for you is not a good look. If you show that you have made an effort and can explain exactly where you're stuck, that will likely get you far more interested parties.

  6. #6
    Addicted Member
    Join Date
    May 2017
    Location
    Italy
    Posts
    170

    Re: Count of a letter in a file *HELP*

    did you search with google all the instructions preceded by vb.net ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width