Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Finding and repeating a character

Finding and repeating a character

Scheduled Pinned Locked Moved C#
csharptutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rostrox
    wrote on last edited by
    #1

    Hi: Trying to know more about C# and its libraries ... Without using explicit iterations, how could I: 1) Determine if a character is in a list of characters? For example if I want to know if the content of variable v is in a list containg 'a','j','1','%'. I normally do: if (v[i] == 'a' || v[i] == 'j' ..... but it is too long if I use with many characters in the list. I would like something like (if a[i] in ('a','j','1','%')) for example. 2) For writing the character ',' 600 times I would like to do this: write(600(',')), for example and not use for statement. Seems to be disheveled but :rolleyes:.... May there may be alternatives. Best regards

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups