Click here to Skip to main content
15,891,951 members

Generate 4 Character String

DamithSL asked:

Open original thread
I'm creating SMS application for notify users about important activities. but the problem is there is no way to track for reply messages for relevant sms. I'm sending and receiving SMS from same number.
What i thought was generate 4 Character string and sending with the message like

<SMS message><space><GeneratedKey>

When user send reply with that generated Key value

<GeneratedKey><space><SMS message>

Using that key value I can find the reply messages for given SMS.

Since that key is need to be easy to enter I thought to generate sequence from both digits and characters and key length is 4.

each character sequence goes like.

0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ

generated keys should be like below.

0000<br />
0001<br />
0002<br />
...<br />
...<br />
0009<br />
000A<br />
000B<br />
....<br />
000Z<br />
0010<br />
....


Before sending SMS i'm going to add record to table with next key and after that I'm sending message with that key value.

Experts please give your thoughts on this approach and also can you please help me to generate next key value from c#?
Tags: C# (C# 4.0)

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900