Questions tagged as '.net'

2
answers

How to associate items from a List of Strings to the code name of a label in C #?

My goal is to make a gallows game. Basically my problem is this: I have a word divided into substrings for each letter of the word, all stored in a vector. For example: string[] letras = new string[numletras]; for (int i = 0; i < numle...
asked by 16.01.2018 / 16:45
1
answer

How to run programs without a specific path

Example: I want to automatically do a search of the program I write, and if you find an ".exe" application it will run it, if it does not find it, send a message saying that the program is not installed on your computer. Process.Start(Progra...
asked by 04.09.2017 / 04:30
2
answers

Is there a surefire way to not wait for a process?

Is there a secure way to not wait for a process in .NET? async Task DoFoo() { // ... GravarLog(); // ... } void GravarLog() { // ... } In the code above, my whole process will wait for the GravarLog() method to finis...
asked by 28.07.2017 / 22:32
2
answers

System.Configuration Reference

I'm trying to use the System.Configuration reference to finish integrating the instances of my code with a .txt block. However, I noticed that unlike Visual Studios on YouTube videos, mine does not have the References tab below the Dependencies...
asked by 31.07.2017 / 19:47
1
answer

The property or indexer "MailAddress.DisplayName" can not be assigned because it is read-only

I can usually send an email. I just can not change DisplayName . Follow the code below: var body = "<p>Email From: {0} ({1})</p><p>Message:</p><p>{2}</p>"; var message = new MailMessage(); message.F...
asked by 16.08.2017 / 23:27
1
answer

C # Visual Studio unknown build error

I was refactoring my code in C # that was working perfectly, but it was gigantic, and it stopped working and visual studio does not describe the error in any corner. Below is my code and Visual Studio. Visual Studio Console PrintScreen Tic...
asked by 21.07.2017 / 19:08
2
answers

How to use and what is the timer function in C #?

//Exemplo de uso(Que não entendi): using System; using System.Threading; public static class Program { public static void Main() { // Create a Timer object that knows to call our TimerCallback // method once every 2000 millisecon...
asked by 10.06.2017 / 13:52
1
answer

Linq to Entities x Lambda Expression

What's the difference between Linq to Entities and Lambda Expression? Is Linq to Entities still used in the Entity Framework or is there something newer?     
asked by 30.04.2017 / 13:21
2
answers

How to get only one information from this table? VB.NET

Hello, I have this table, which has no class, id, or name. I would like to take only her phone. How would you get it? <tr> <td><a href="http://www.google.com/">1</a></td>...
asked by 18.03.2017 / 19:24
2
answers

Object reference not set to an instance of an object?

I am connecting to the database and calling a procedure to insert in the database but this error occurs you know the reason: Code: Dim con As SqlConnection = New SqlConnection() Dim cmd As SqlCommand = New SqlCommand() con = Nothi...
asked by 24.02.2017 / 18:10