Download
100% FREE
Office Document APIs for .NET
Online: 420
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
Windows Forms
>
Loading ...
Increment value of an string [Resolved]
Posted by
Sudhakar_A
under
Windows Forms
on 9/5/2013 |
Points: 10
| Views : 1665 | Status :
[Member]
| Replies : 2
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
string sequenceno="0003";
I wan to increment value of the string by 1 wen a for loop run i.e string sequenceno should be "0004"- in 1st loop & "0005" in 2nd loop and soon.
Please help me sort out.
Thnk's in advance
[Resolved]
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Allemahesh
on: 9/5/2013
[Member]
[MVP]
Silver
|
Points: 50
0
You can use the below method.
Here you need to set the i max value.
In my below example, I have set 50.
string sequenceno="0003";
for(int i=0; i<50; i++)
{
sequenceno = convert.ToString(Convert.toInt32(sequenceno) + 1);
}
Happy coding.
Sudhakar_A
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Allemahesh
on: 9/5/2013
[Member]
[MVP]
Silver
|
Points: 50
0
You can use the below code as well.
int a = 50;
string sequenceno="0003";
for(int i=0; i<a; i++)
{
sequenceno = convert.ToString(Convert.toInt32(sequenceno) + 1);
//Do you process.
}
Happy coding.
Sudhakar_A
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
Assignment help UK | GotoAssignmentHelp
(0)
New
How to handle 302 status (Moved temporalily)
(1)
Failed to find a valid digest in the 'integrity' attribute
(1)
Angular Template parse error occured while rendering 3rd party website in ASP.NET
(0)
How to display 2 tables in a single line in 2 div tag
(1)
I Want to Do a multiple selector on ASPnet MVC
(0)
Get all materials of parent and its children in an array except for few
(0)
Container in Media Query
(0)
More ...