Questions tagged as 'c#'

1
answer

Entity Framework 6: Error getting registry in SQL Server

I can enter records in the bank normally, but when I try to get it, it gives error in EF. public class Program { public static void Main(string[] args) { new ClienteConsole().ConsoleListarCliente(1); } } public class Clien...
asked by 10.11.2017 / 18:48
1
answer

How to use loop for? [closed]

How to use loop for this? I've always tried to make mistakes. I'll express myself better! What I'm not getting and that this repetition of Metrotiles 1 2 3 4 5 is just one in loope for i, then it would just be metrotile [i]. something an...
asked by 01.08.2017 / 15:34
3
answers

Object is not persisted when using Entity Framework

I am using the Entity Framework 6 and the SqlServer . I have an object called category, where I want to persist it in the database. and when I run this function, it persists the object correctly because I have a datagrid where I can see tha...
asked by 16.12.2017 / 02:12
1
answer

Verification in login form

I'm not able to do a check in the database, to make sure the user exists. Here is the code: private void button1_Click_1(object sender, EventArgs e) { string conexao = "SERVER = localhost; DATABASE = dizimistas; UID = root; PASSWORD = senh...
asked by 29.11.2017 / 12:47
1
answer

Game engine 2d free [closed]

I'm thinking about starting a basic 2D game in C # , but I can not find any free game engine I can use. Please, if you know any free and simple to use, please reply, I'll be grateful.     
asked by 20.08.2015 / 18:58
2
answers

Exception of type System.NullReferenceException

Soon after logging in to the system I try to access a page and the system sends me back to the login page and immediately after login again, this exception happens: "An exception of type 'System.NullReferenceException' occurred in MyProject. dll...
asked by 11.08.2016 / 16:09
1
answer

ViewBag losing reference after submitting form. Asp.Net MVC

Hello, I have two ViewBags that are storing a list each, I load them into a form to make a select box, next to them has a Remove button. So far so good, but when I click the first ViewBag button, a reference loss error occurs, the second ViewBag...
asked by 29.05.2014 / 23:13
1
answer

How to instantiate an abstract class in C #?

I know that the abstract class can not be instantiated. But I need to call it in Windows Forms and I'm not getting it.     
asked by 27.04.2018 / 17:33
2
answers

Remove half of file name [closed]

I have a page to get a path, which is Folder Browser Dialog and the path that is saved is like this: "C: \ ana \ Updates \ 2017 \ 2017_04 \" I wanted from the path to save in a variable only the result: 2017 \ 2017_04.     
asked by 29.05.2017 / 16:33
2
answers

Error in DateTime.TryParse

I'm having a problem converting using the code below: string vcto = "29/01/2018"; DateTime data; Boolean resp = DateTime.TryParse(vcto, out data); if (resp == false) { MessageBox.Show("ERRO...
asked by 28.09.2018 / 21:37