Click here to Skip to main content
15,895,709 members
Home / Discussions / C#
   

C#

 
AnswerRe: Implementing MVC architecture in Windows Form Pin
Christian Graus2-Oct-09 23:51
protectorChristian Graus2-Oct-09 23:51 
GeneralRe: Implementing MVC architecture in Windows Form Pin
srikrishnakrishna murthy3-Oct-09 0:17
srikrishnakrishna murthy3-Oct-09 0:17 
GeneralRe: Implementing MVC architecture in Windows Form Pin
Christian Graus3-Oct-09 10:54
protectorChristian Graus3-Oct-09 10:54 
QuestionC# Programming ? Pin
Dossa2-Oct-09 23:11
Dossa2-Oct-09 23:11 
AnswerRe: C# Programming ? Pin
nagendrathecoder2-Oct-09 23:13
nagendrathecoder2-Oct-09 23:13 
AnswerRe: C# Programming ? Pin
Christian Graus2-Oct-09 23:13
protectorChristian Graus2-Oct-09 23:13 
QuestionException....PLSSSS HELPPPP :(( Pin
linto_112-Oct-09 22:54
linto_112-Oct-09 22:54 
AnswerRe: Exception....PLSSSS HELPPPP :(( Pin
Christian Graus2-Oct-09 22:58
protectorChristian Graus2-Oct-09 22:58 
linto_11 wrote:
nd d


linto_11 wrote:
d code nd help


This txt speak makes you look even more retarded than posting a new question right above your old one does.


linto_11 wrote:
book = reader[rnd].ToString();


You need to read some books, and read the documentation. You can't just invent code and expect it to work. What your code does, is reads every row. Then, the reader is pointing to the end of the file. Then your code, in theory, tries to read a column of data on the current row, only, it's no longer pointing to a row. The issue is that you have no idea what you're doing.

The way I would do this, is to read the data into a dataset, then check how many rows the table has, and access a random row from there. That would have the distinct advantage of actually working. The other way would be to store the data into an array as you read it, then access the array at random. That would have the advantage of being something you could do on load, and remove words as you use them, meaning you don't need to access the DB again for that game session.

Christian Graus

Driven to the arms of OSX by Vista.

Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

GeneralRe: Exception....PLSSSS HELPPPP :(( Pin
nagendrathecoder2-Oct-09 23:09
nagendrathecoder2-Oct-09 23:09 
GeneralRe: Exception....PLSSSS HELPPPP :(( Pin
linto_112-Oct-09 23:13
linto_112-Oct-09 23:13 
GeneralRe: Exception....PLSSSS HELPPPP :(( Pin
Christian Graus2-Oct-09 23:14
protectorChristian Graus2-Oct-09 23:14 
GeneralRe: Exception....PLSSSS HELPPPP :(( Pin
nagendrathecoder2-Oct-09 23:15
nagendrathecoder2-Oct-09 23:15 
GeneralRe: Exception....PLSSSS HELPPPP Pin
linto_112-Oct-09 23:22
linto_112-Oct-09 23:22 
GeneralRe: Exception....PLSSSS HELPPPP Pin
linto_112-Oct-09 23:25
linto_112-Oct-09 23:25 
GeneralRe: Exception....PLSSSS HELPPPP Pin
nagendrathecoder2-Oct-09 23:28
nagendrathecoder2-Oct-09 23:28 
GeneralRe: Exception....PLSSSS HELPPPP Pin
Richard MacCutchan2-Oct-09 23:29
mveRichard MacCutchan2-Oct-09 23:29 
GeneralRe: Exception....PLSSSS HELPPPP Pin
Christian Graus2-Oct-09 23:57
protectorChristian Graus2-Oct-09 23:57 
GeneralRe: Exception....PLSSSS HELPPPP Pin
Richard MacCutchan2-Oct-09 23:27
mveRichard MacCutchan2-Oct-09 23:27 
GeneralRe: Exception....PLSSSS HELPPPP Pin
Christian Graus2-Oct-09 23:43
protectorChristian Graus2-Oct-09 23:43 
QuestionException in C# Pin
linto_112-Oct-09 22:11
linto_112-Oct-09 22:11 
AnswerRe: Exception in C# Pin
nagendrathecoder2-Oct-09 22:30
nagendrathecoder2-Oct-09 22:30 
GeneralRe: Exception in C# Pin
linto_112-Oct-09 22:43
linto_112-Oct-09 22:43 
GeneralRe: Exception in C# Pin
Christian Graus2-Oct-09 22:54
protectorChristian Graus2-Oct-09 22:54 
AnswerRe: Exception in C# Pin
nagendrathecoder2-Oct-09 22:55
nagendrathecoder2-Oct-09 22:55 
GeneralRe: Exception in C# Pin
Christian Graus2-Oct-09 23:00
protectorChristian Graus2-Oct-09 23:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.