In the example below, how would I stop printing the positions of this vector that are equal to 0
int[] caluculo = {50,6,0,59,6,7,0,6,8};
for(int i = 0 ; i < 9 ; i++)
{
Console.WriteLine("{0}",calculo[i]);
}
How do I display the current day in a program? But I did not want to take the zero to the left. For example: on 01 I want it to be 1, on 02 I want it to be 2.
I have two classes one that has a list and I would like to have an event that every time this list was changed this event was called.
public class Exemplo
{
List<string> lista = new List<string>();
//Quando esta lista foi a...
I was having an error in a business rule, and by investigating, I came up with the following code snippet, which is intended to check if all processes in a list are active:
return processos.All(proc => proc.Ativo)
When debugging,...
The user pastes the values that will be saved into the vector and then displays those values. However the following error is occurring:
An unhandled exception of type 'System.IndexOutOfRangeException' occurred in vetoor.exe ".
My code l...
I made a class that has the following code to send an email:
try
{
WebMail.SmtpServer = "smtp-mail.outlook.com";
WebMail.SmtpPort = 25;
WebMail.EnableSsl = true;
WebMail.UserName = "meuem...
I have a project of type class library where I have my Context, in it I get the SQL connection that is in my web.config .
How can I add the SQL connection so that it stays inside the DLL? I want to pass the direct connection here, w...
I have a program that does I / O of files (create, edit, save), but I need to put it to do this I / O with files that are in the company network, both reading and writing.
My question is: Does my program need file read and write permission, or...
Recently I formatted my notebook and had to reinstall everything, but now my TCC project is in error, which I did not have before.
In this code snippet:
SpeechRecognitionEngine sre = new SpeechRecognitionEngine(new CultureInfo("pt-BR"));...