2 Replies - 317 Views - Last Post: 02 March 2013 - 03:36 AM Rate Topic: -----

#1 jmProg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 04-July 12

How to compare strings

Posted 02 March 2013 - 03:16 AM

My question is.. How can I compare two strings?
It's for the game: FLAMES

For example:
txt1.Text = "Sophia"
txt2.Text = "Patricia"

I want to count how many the same letters do these two strings have.

The output should be:
3 - pia
5 - pia

total - 8
Is This A Good Question/Topic? 0
  • +

Replies To: How to compare strings

#2 jmProg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 04-July 12

Re: How to compare strings

Posted 02 March 2013 - 03:30 AM

BTW, this is for visual c sharp..

I'm not familiar with char declarations in visual c sharp so I need help..

Thanks!
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3252
  • View blog
  • Posts: 10,903
  • Joined: 12-December 12

Re: How to compare strings

Posted 02 March 2013 - 03:36 AM

A simple C# example at dotnetperls
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1