.net

Why are you saying that this object is null?

papelX.moderador = abc.Id; papelX.participantes.Add(abc); I'm finding a NullReferenceException in this code above. I am cr ... ting the mouse over abc I realize that several properties from him are properly filled. It's not null. Why is this happening?

Setup.msi prompts the user to install o.NET Framework 4.6.1

I have a * package.msi of a software developed by me, with the Visual Studio setup Project. When a user tries to run the ins ... he problem is that this results in two files an msi and an exe. Is there a way to package everything only in msi? Thank you.

How to show error message?

I am developing a C # record in Visual Studio and have created a method to include a new record in the database. The method ... n is: instead of showing the word "error" on the screen, I want to show which error caused the failure so that I can correct.

How to multiply a character " X " as many times as you want?

Is there any method that multiplies a character " X " as many times as I want? example: I have the character " P " P x 5 = "PPPPP" Is there any ready method in .NET?

What is the difference between Table and Matrix and List in Report View?

So far in my reports I have been using tables and I link my datasets to these. But today I had the need to use a List to create a card(I'm still trying to understand how it works). When to use Table, Matrix and List and their differences?

What are statements and operators?

I often access MSDN often and see these Terms quite a lot. What are statements and operators? What sets you apart?

Recover external IP without third-party services

I have a WPF application. I need to know the external IP of the machine that is running this application. I found some tutor ... ntinued. Does anyone know if it is possible to do this natively with the .NET Framework without using third-party services?

Customize message by the hour

Wanted to customize the greeting message depending on the time. Ex: Hora menor que 12h. "Bom dia" Hora menor que 18h. "Bo ... le.WriteLine($"Boa noite {nome}!"); } else if (hora <= 5) { Console.WriteLine($"Boa madrugada {nome}!"); } #endregion

Find out if it is even or odd in array

I am trying to define the even and odd numbers from a total of 5 user-reported numbers in a vector. int[] atividade ... } Console.WriteLine("Os seguintes numeros foram digitados: "); foreach (int i in atividade)

Should I use a "try-catch" to identify if a password is wrong?

On the screen of login, I perform the check in the bank by means of a select, and I am using catch to catch this exception. ... sageBoxIcon.Error); } finally { sqlconn.Close(); } }

Vigenere figure

private static void algoritmo(String input, String chave, Boolean b) { Console.WriteLine("Digite a mensagem: "); ... would sum the same index values of array. How can I make for output and codeKey to exit with the ASCII values of the input?

What is Runnable for?

I was thinking of creating thread one in my software, but I saw from the forums that Runnable helps in some way in creating a thread, and wanted to understand how it works.

How to iterate over a dictionary?

I've seen several ways to iterate over a dictionary. Is there a considered standard?

Generate 32-character MD5 password with CryptSharp

I am using CryptSharp library to Generate Password in MD5. I had read that MD5 generates string with hexadecimals of 32 chara ... ne who has already used know if there are any parameters in this library that can leave my password encoded in 32 characters?

Comparing only the DateTime field date in C#

I need to compare only the date of two fields DateTime. DateTime aux = new DateTime(2016, 09, 02, 10, 0, 0); if (aux.Equals( ... is equal on both objects. In this case it does not enter because the Time of the two objects is different. What should I do?

What is scaffold?

I started studying ASP.NET MVC and I came across the term scaffold, I did not understand very well, so the questions. 1º what is it? 2º what is its use within the ASP.NET MVC?

Dynamically create fields and set in model

I am developing a register, where I have my fields according to my model: public class Autor { [Key] public int IdA ... arameter a list of authors, I don't know if it's right. I hope you understand my problem, thank you and look forward to help.

Redeem code from an executable program?

I created a program to present in college, but due to problems in my HD, I lost its code and only have the executable I creat ... I need to know if it is possible to redeem without having to create the entire program again. I'm using Visual Studio 2013.

Reset a variable, or recreate it?

In terms of performance, what is more preferable? Are there any other differences between the two modes, other than performan ... odo() For i As Integer = 0 To 100 Dim MeuTipo As New Tipo MeuTipo.FacaAlgumaCoisa() Next End Sub

Error opening application with process.start

I have an application that when trying to run with process.start or even direct through cmd Windows, does not start correctly ... ecause it does not pull this file .ini, does anyone know any other way to try to open the app via command prompt or via C#?