15,916,702 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by JackStone (Top 7 by date)
JackStone
16-Mar-11 17:58pm
View
Deleted
object[] objs = new object[value];
string[,] strings = new string[value,5];
int pos = 0;
while (Reader.Read())
{
int test = Reader.GetValues(objs);
for (int teeeest = 0; teeeest <= 5; teeeest++)
{
strings[pos++, teeeest] = string.Join(", ", objs);
}
}
for (int test1 = 0; test1 < strings.Length; test1 ++)
{
for (int test2 = 0; test2 < strings.Length; test2 ++)
{
Console.WriteLine(strings[test1,test2 ]);
}
}
My code is like this now. What needs to be changed?
JackStone
16-Mar-11 17:58pm
View
Deleted
object[] objs = new object[value];
string[,] strings = new string[value,5];
int pos = 0;
while (Reader.Read())
{
int test = Reader.GetValues(objs);
for (int teeeest = 0; teeeest <= 5; teeeest++)
{
strings[pos++, teeeest] = string.Join(", ", objs);
}
}
for (int test1 = 0; test1 < strings.Length; test1 ++)
{
for (int test2 = 0; test2 < strings.Length; test2 ++)
{
Console.WriteLine(strings[test1,test2 ]);
}
}
My code is like this now. What needs to be changed?
JackStone
16-Mar-11 17:56pm
View
Deleted
object[] objs = new object[value];
string[,] strings = new string[value,5];
int pos = 0;
while (Reader.Read())
{
int test= Reader.GetValues(objs);
for (int teeeest = 0; teeeest <= 5; teeeest++)
{
strings[pos++, teeeest] = string.Join(", ", objs);
}
}
for (int test1= 0; test1< strings.Length; test1++)
{
for (int test2= 0; test2< strings.Length; test2++)
{
Console.WriteLine(strings[test1,test2]);
}
}
My code is like this now. What needs to be changed?
JackStone
16-Mar-11 17:48pm
View
Deleted
now my string[,] strings = new string[value,4];
how can i add now each line on strings array ?
What needs to be changed on strings[pos++] = string.Join(", ", objs); ??
JackStone
16-Mar-11 17:42pm
View
Deleted
The first results that comes out of the strings[pos++] = string.Join(", ", objs); is:
John, London, 1234, UK
Smith, Berlin 2345 GE
etc
etc
etc
Can i now save this data into string array of size, in my example 2X4, so i can edit them the way i want ?
string[] strings = new string[value]; should be changed to
string[,] strings = new string[value, ?????];
and then??
JackStone
16-Mar-11 17:00pm
View
Deleted
How can i do it if i don't want all of the data taken from objs just to be stored in one line of my strings array?
For example if i have John London 1234 UK i want to store it in an array of size 1X4. How this can be done ?
JackStone
16-Mar-11 16:02pm
View
Deleted
You can see the updated question.
Show More