Questions tagged as '.net'

1
answer

How do I add an element to a list?

What is the correct syntax for calling the Add_Pessoa method of the ClsPessoa class for a List? public class ClsPessoa { private static string PSTR_Nome = ""; private static DateTime PDT_DataNascimento; private static...
asked by 11.10.2015 / 22:29
2
answers

How to print in dot matrix printer on the client with a web application?

I have an application made in C # MVC with a routine to print plain text on the default printer. The RawPrinterHelper.SendStringToPrinter method that is described in this article has been used. Printing normally occurs when I run the ap...
asked by 23.10.2015 / 22:43
1
answer

Accessing data stored in cookies?

At login, I store user information logged into a cookie (name, password, etc ...) How do I access this cookie and retrieve information from it? For example, I want the name of the logged in user to appear in the upper bar, my logic would h...
asked by 23.10.2015 / 19:02
1
answer

Correct use of async and await in Asp.Net

I am creating an asynchronous method for sending Emails from the opening or changing of the object, but when calling the method of sending mail I have to put await in front and the return of the method has to be async Task, do this in the contro...
asked by 03.09.2015 / 20:24
1
answer

How to get attribute of a generic type object?

I'm having trouble retrieving an object to get a specific attribute. I want to override the Equals method in my class, to compare if the title of the objects are identical. In this case, it does not matter if the type and the other a...
asked by 18.04.2016 / 04:55
1
answer

Is it possible to delete "C:" using Directory.Delete?

Using Directory.Delete("C:", true) deletes the partition? Or is it just blocked and does not execute?     
asked by 20.09.2016 / 16:05
1
answer

Impact of Garbage Collector

The project here is done in Windows Forms and we do not manage the memory very well because it is a legacy system that has several years running. We are currently experiencing problems with a lack of memory on the computers where the system...
asked by 20.09.2016 / 19:36
2
answers

Execute N threads and know when they all finished executing

I have the following problem, I need to run the same N method in a for and know when all the threads have already finished running it. I needed something like this: foreach (MeuObjeto obj in lstObj) { new Thread(delegate() { Me...
asked by 11.04.2015 / 01:06
2
answers

How to hide column of DataGridView?

I have the void PopulaGrid(DataGridView grid, SQLiteDataReader dados) function that feeds my dataGridViewAlunos data, I would like to know how to hide the first column of dataGridViewAlunos which is the column correspondin...
asked by 13.12.2015 / 02:23
1
answer

NullReferenceException using HtmlAgilityPack

I'd like to know how many tags <a> exist within div , but the NullReferenceException Exception is raised upon reaching XPath. var baseURL = "AQUI VAI A MINHA URL"; var client = new HtmlWeb(); var pagina = client.L...
asked by 05.07.2016 / 00:05