Questions tagged as 'c#'

1
answer

How to tell if a System.Timers.Timer is running? [closed]

I need to know if a timer is running, if it is not, I will start it,     
asked by 15.07.2016 / 02:39
2
answers

DataReader opens and gives error for not closing

I have DataReader on my website to read the data the bank brings. I have a problem with VS, but I do not know how to do it.    There is already an open DataReader associated with this Command that must be closed first Would there be...
asked by 18.10.2016 / 14:24
3
answers

Separate a string in C #

I'm working with C # and want to know, please how do I separate the contents of a file containing the following information: There are 30 calories in Pumpkin (1 cup) . There are 83 calories in Pumpkin (without Salt, Canned) (1 cup)...
asked by 21.11.2016 / 19:49
1
answer

What is the [HttpGet] statement for? [duplicate]

In a given method of my Controller created in Asp Net MVC , I learned that I could put the [HttpGet] statement. In other cases, like in my models, I realized that you can also put [Length(10)] and still other things....
asked by 04.05.2016 / 14:57
1
answer

WYSIWYG editor with code style

I'm creating a website where I'll post some snippets of code (like a backup of my code), and for that, I'm using ASP.NET MVC. You're almost done, what's missing is a WYSIWYG editor that meets my needs. I'm using TinyMCE. It's very good, bu...
asked by 23.04.2016 / 21:46
1
answer

How to create thread in loop in C #?

How do I create a thread that executes a function, waits 1 second, and then re-runs in loop until the program quits?     
asked by 08.08.2016 / 22:18
1
answer

Fluent Api inserting unwanted records

I have the following classes: Status.cs public class Estado { public Int32 EstadoId { get; set; } public Int32 CodigoEstado { get; set; } public String Sigla { get; set; } public String Nome { get; set; } public virtua...
asked by 26.08.2016 / 21:14
1
answer

Extract .zip file

I have a file that is zipped by 7-Zip, at the time of unpacking by C #, using the following code: try { ZipFile.ExtractToDirectory(caminho + "\" + arquivo, arquivo); } catch (Exception e)...
asked by 18.04.2016 / 15:29
1
answer

Combobox is loading wrong array information

I made a C # (WinForms) application to load the marks according to the type of vehicle that is selected (car, motorcycle or truck) in a combobox. I put the following code at a button: private void btnCheck_Click_1(object sender, EventArgs e)...
asked by 13.04.2016 / 16:47
2
answers

C # conversion from a private void to public void [closed]

Hello everyone, I wondered how I can convert this code to public void . Visual Studio reports an error in the and variable. Error message: "The name 'and' does not exist in the current context" I just made ctrl+c and ct...
asked by 02.08.2016 / 15:55