Posts by Leonardo Araujo • 55 points
6 posts
-
0
votes3
answers97
viewsQ: How to write times on console entries without repeating too much code
I wish that all Console.WriteLine this way when sent to the Console: [10:38:12:758]- Message typed in writeline Well I’ve already done a part that’s this: private static DateTime data =…
-
0
votes2
answers41
viewsQ: Connect to SQL with Appconfig
How can I connect to SQL with connectionstring in Appconfig? I did so, but I wish it could be for Appconfig, how can I do? private void button1_Click(object sender, EventArgs e) { string…
-
0
votes1
answer199
viewsQ: System.Indexoutofrangeexception Sqldatareader
Hello, I am trying to make a code read what is in the SQL Server Database, but I have this error: System.IndexOutOfRangeException: Pontos em…
c#asked Leonardo Araujo 55 -
-3
votes1
answer80
viewsQ: How to cancel action with key
As it cancels an action, the code below is only one example: Console.WriteLine("Digite algo"); string text = Console.ReadLine(); switch (){ case "comando": // > Aqui seria para cancelar com a…
c#asked Leonardo Araujo 55 -
0
votes1
answer328
viewsQ: If the user enters such number in the console will do an action
How do you when the user enters such a number in the Console will do an action? For example: Console.WriteLine("Escreva 1 para acontecer algo, 2 para acontecer outra coisa"); In case I don’t need…
c#asked Leonardo Araujo 55 -
0
votes1
answer172
viewsQ: Create a command-only class
I created a class only of commands, so far so good, I pulled the class of commands to the main class but I’m with a mistake Command class: public bool OnCommand(string[] args) { if (args.Length >…
c#asked Leonardo Araujo 55