Most voted ".net" questions
The Microsoft . NET is a set of libraries and functions that are part of the Basic Class Library (BCL), such as user interface functions, data access, connectivity, cryptography, web development, mathematical algorithms, and network communication.
Learn more…2,689 questions
Sort by count of
-
1
votes1
answer107
viewsEdit Activedirectory user with C#
Hello, I am trying to add the initials of the company’s employees in the initial parameter of the AD user and when trying to run it returns me the following message:…
-
1
votes1
answer281
viewsSwagger Json in Postman does not put the API URL
I am using the Swagger library on . NET CORE in a Web API to generate the documentation, below is my startup.Cs: public class Startup { public Startup(IConfiguration configuration) { Configuration =…
-
1
votes1
answer160
viewsGet String (.net core for Jquery) value
I am developing a site with . net core and I am using Jquery. On the page Index.cshtml.cs I have a function that has the validations and I pass the messages (if it is ok, if there was an error),…
-
1
votes0
answers25
viewsInteracting with images
Talk guys.. I’m new in the area, but I’m looking to study a lot.. I started with java, I already did a lot of "things", small business automation software and Talz.. however, I wanted to make a new…
-
1
votes3
answers194
viewsTake what’s between the quotes
As I do to get only what is inside double quotes, the problem is the following, it is reading a file txt q on each line has a file path, as this below "Dinosfuls Mods.bmd" 45454545s 454545 How do I…
-
1
votes1
answer68
viewsHow not to repeat the same code on an overload?
What would be correct technique not to repeat the same code for these two overloads or maybe not to have the overloads? It happens that sometimes I have to pass a parameter that is a string array…
-
1
votes2
answers101
viewsWhat reason does the "missing()" at the end of the program send me an error in which it is not possible to compile?
Main Nota estudante = new Nota(); estudante.Matricula = Console.ReadLine(); estudante.Nome = Console.ReadLine(); estudante.Idade = int.Parse(Console.ReadLine()); estudante.Prova1 =…
-
1
votes3
answers132
viewsChoose Modal from variable
I am giving the value to a variable string in my index.Cs file and then I am taking the value to use in Typescript, however I am creating another page besides index now and is giving error when I…
-
1
votes1
answer89
viewsAm I required to use a repeat loop if my LINQ query returns only one object?
My class: public class Carros { public int ID { get; private set; } public string Atributo2 { get; private set; } public int Atributo3 { get; private set; }}} Suppose the ID attribute could not…
-
1
votes1
answer70
viewsMonitoring the last Row from a table
I’m trying to monitor the latest row bank MySQL and when this is changed I will display a message, however I am having doubts on how to monitor with C code#. I’ve managed to requisition the last row…
-
1
votes1
answer65
views -
1
votes0
answers36
viewsVB.NET - Changeopacity does not work
When executing my code the following message appears to me: "BC30451 - Changeopacity is not declared. It may be inaccessible due to its level of protection." I’m making an effect on my…
-
1
votes2
answers99
viewsWhy doesn’t my variable change the value?
I have several variables and one of them is menor, when checking her out (output) I realized that the same always remains at zero, because this is occurring? int z, menor = 0, maior = 0; for (int i…
-
1
votes1
answer384
viewsThere is no mapping of the System.Windows.Forms.Toolstriptextbox object type to a native type managed provider
I’m having a problem trying to make an appointment at a Select and bring the information on TextBox. There is no mapping of the System.Windows.Forms.Toolstriptextbox object type to a native type…
-
1
votes1
answer40
viewsrefer to the logged in user’s id if missing
I’m doing a Net Core MVC point card project, in which I have user, company and employee registration. To register the company I need to get the id of the logged in user, I already have a function…
-
1
votes0
answers273
viewsSave cookies to Selenium
I’m developing an automation in Selenium C# to log in to Facebook and do some operations, but every login asks me to account verification. There is a way you can save authentications as a common…
-
1
votes1
answer103
viewsWhy does the model return null after using Automapper?
To model Endereco returns null after mapping (Automapper), why ? Example: using AutoMapper; using System; using System.Collections.Generic; using System.Linq; using System.Text; using…
-
1
votes1
answer66
viewsDefault value in Select List . net Core 2.2
In my system I have a select which returns the recorded data in your database table, the problem is that the list already starts with the first record automatically, and I need her to return a…
-
1
votes1
answer123
viewsJsonproperty(Propertyname) does not recognize and assign values to the object
I’m creating a API, POST method, where the payload consists of 3 classes with the following structure: //Classe principal do payload public class Representante { [JsonProperty(PropertyName =…
-
1
votes2
answers87
viewsHow to get a return from a Webapi Exception?
I have the following method that makes a request for Delete to my WebApi: [HttpPost] public async Task<IActionResult> Delete(int id, IFormCollection frmCollection) { HttpClient httpClient =…
-
1
votes0
answers42
viewsWindow appears hidden behind google maps in expanded mode
I am developing a webpage using the languages Asp, c#, javascript with Telerik framework. When I am on the map in expanded mode, I circle a region of the map, and I click on the button of that…
-
1
votes2
answers868
viewsError: Incorrect decimal value: ' for column 'Value' at Row 1
I’m having a problem inserting a die of a maskedTextBox in the Mysql database. Follow the error Incorrect decimal value: ' for column 'Value' at Row 1 The code is this: conexao.Open(); MySqlCommand…
-
1
votes1
answer52
viewsIncorrect visualization of items in POO code in C#
My code it needs to receive the values of three books that are code, title, author, publisher and value. Only that the view is confused. The impression that nome do livro 0: q // Devia mostrar livro…
-
1
votes0
answers90
viewsEntityframework error
Could someone help me ? I’m trying to do Codefirst and when I execute the command I get this error: The 'System.Data.Entity.Internal.Appconfig' type initializer triggered an exception. My Appconfig…
-
1
votes0
answers71
viewsMoq in c# methods of different classes
Good night. I’m new to unit testing. I’d like to ask for help to resolve a question. I have the following method of a class that calls the method of another class: class public Teste: ITeste {…
-
1
votes2
answers342
viewsUse of the unassigned local variable of two strings in C#code
My code should be entered the gender of a person, height and age of a person in a repeat loop for 10 people. The code must show the greater weight, lower weight, average height of 10 people, the…
-
1
votes2
answers1559
viewsCS0029 Error - Cannot implicitly convert "int" to "bool" as a function of C#
The code receives a user number and print if it is positive for True and if it is negative for False, only that there is a mistake of types going on and I don’t understand how to solve. using static…
-
1
votes0
answers40
viewsAutomatically create folder in Csharp project with audio files
I have a project in C#, created a folder in the project by Visual Studio 2019 and put 2 Ogg’s there. The structure is as follows: App Assets Files (this is the folder I put the audio files in) Model…
-
1
votes2
answers58
viewsOrganization for future code maintenance when I have two similar functions
I have two functions, one returns only the first result and the other also returns the first result or returns more than one result. I created the "string all" parameter to define whether to return…
-
1
votes1
answer65
viewsSpeech recognition is giving stack overflow
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Speech.Synthesis; //namespace using System.IO; namespace SIF { public…
-
1
votes0
answers22
viewsVB.NET webserver gets spammando requests
Hello. I’ve just set up a Vb.net webserver to receive requests that arrive on the localhost. This webserver has the role of redirecting these requests to another address. What happens is that it…
-
1
votes0
answers72
viewsHow to handle an Exception of an http Request in Asp Net MVC
Hi, I have an app on ASP.net MVC who’s making a requisition http through a connection port that is available through a service, which is running on the server. The controller calls the method and…
-
1
votes1
answer175
viewsUnable to convert from decimal to double
The abstract class Figura has the virtual method CalculoArea(), where the derived classes called Quadrado, Retangulo and Circunferência override this method according to its geometric figure…
-
1
votes1
answer88
viewsFill variable with different types
I have many fields to pick up so it is very bad to make a function for each connection and they are uncharted banks so using something like the Entity Framework is also not feasible if (1 == 1) {…
-
1
votes2
answers120
viewsWhat is the correct place to store the validation messages in a . NET project?
I’m creating a relatively simple class, but I’ve included some validations in its properties. public class Sala : EntidadeBase { #region Enums public enum StatusSala { Disponivel, Reservada,…
-
1
votes1
answer110
viewsXamarin Firebase Auth does not install by Nuget
Good morning friends. I’m starting a project in Xamarin Forms for iOS and Android, and will use Firebase for Authentication (Xamarin.Firebase.Auth). But when selecting in the package manager (Nuget)…
-
1
votes4
answers491
viewsPrint values of a vector without line break
Hello, I’m performing a C# exercise that asks for the following: The output with even numbers should be presented without line break, but I do not understand how I can do this. My code is like this:…
-
1
votes3
answers1361
viewsC# Manipulate Postasync Response
I have the following code: string json = new JavaScriptSerializer().Serialize(new { email = textBoxLogin.Text, password = textBoxSenha.Text }); using (var client = new HttpClient()) { var response =…
-
1
votes1
answer231
viewsUpload image with Vue.js + . net core 3.0
I’m trying to upload an image, but the image always comes as null on my controller This is my Viewmodel which I receive the image: public class UpdateViewModel { [Required(ErrorMessage = "Nome é um…
-
1
votes1
answer73
viewsIn a banking scenario with high transaction volume Code First can be higher than Database First or vice versa?
I am architecting the development of a backend structure composed of microservices for a financial institution. Probably the biggest project I’ve ever worked on, and I’m having serious doubts about…
-
1
votes0
answers41
viewsButton to insert entries into the BD
I am conducting a project for my PEF that consists of creating a Company Database. However, I decided to put a button to add records and when I click to add, the following error appears: Failed to…
-
1
votes1
answer89
viewsConsole input is not treated correctly
When compiling my code in Visual Studio Professional 2019, it is giving error, for example: Digite sua idade : 12 Você é adulto Code: using System; //Usa A Biblioteca System public class Idade {…
-
1
votes1
answer54
viewsOperation of the "Contains() method"
I have a array of strings: string[] warnings = { "INQUIRY REQUEST", "ITEM ALREADY EXISTS", "ITEM NOT FOUND", "END OF FILE", }; and I have a variable with the following value: status = " 18:46:24:97…
-
1
votes1
answer39
viewsList of objects generating string
I have an object list Person that contains a list of Endereços. I would like to print this person with the addresses on string. var pessoa = new Pessoa() { Nome = "Jão" }; var e = new Endereco() {…
-
1
votes2
answers109
viewsAccess a Form method to another Form
I have a Method carregarLista() on form calling Funcionarios, and would like to access this method from another Form called Cancelar. The method is published in Form Funcionarios, I just can’t…
-
1
votes2
answers112
viewsGenerating a txt with random numbers repeats the numbers
The program has to generate 10 letters and then skip a line with 10 different letters. I used the Random() and I was able to generate 10 random letters, only then just the lines repeat. Like, it…
-
1
votes1
answer219
viewsAxios + . Net Core - Post with file
I need to send the data of a form along with the Axios file and return a JSON with . netcore, I can receive the file normally in the controller but the form data cannot receive. Follows JS code…
-
1
votes1
answer89
viewsMethod overload in C#
I am learning about overload methods in C# and would like to create a simple program that reads a user’s age and name, but would like to create two methods with the same name (overload) where…
-
1
votes0
answers15
viewsHow to correctly implement a System.Threading.Monitor in . net core
I have a piece of code that implements a Monitor. The purpose of this code is not to allow another thread to write in the log while one of them is running. This code works perfectly in . net…
-
1
votes1
answer141
viewsHow to make a Soap call on . Net Core
I am trying to consume an external service that receives an xml Soap, but always returns error 500 (Internal server error). But if I test via SOAPUI works normally. I have tested several types of…