Most voted "c#" questions
This tag should be used when the question refers to some resource, information or problem related to the C#language. C# ("C Sharp") is a multi-paradigm programming language that has strongly typed variables, is imperative, declarative, functional, generic, object-oriented and component-oriented, which are designed to be executed in . NET Framework.
Learn more…13,899 questions
Sort by count of
-
0
votes1
answer58
viewsUnexpected symbol, can’t I detect it?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace ProgramacaoParalela { class Program { static…
-
0
votes1
answer124
viewsQuery to bring 1 parent record and in it can contain multiple children records (performance)
Supposing for the client I can add more joins as not only sales, and the result of this consultation bring much more records. This is a performative way of working or would be better to query each…
-
0
votes0
answers44
viewsHow to create a group of routes in Blazor with parameters?
I’m trying to create a structure in my Blazor Client-Side like this: Pages Users Index.Razor Show. On my page Index is like this at the beginning: @page "/users/" And on my page Show is like this:…
-
0
votes0
answers49
viewsNo return when fetching the Private Certificate Key
I need to sign a string with a digital certificate. However, when passing through the line that searches for the private key, the variable rsa is getting the NULL value, falling into the if and…
-
0
votes2
answers209
viewsMigration Imprimelistagem V9 - V10 in web application
Good morning, I have a problem migrating Imprimelistagem from V9 to V10 in a web application. PriEngine.Platform.Mapas.Inicializar("VND") PriEngine.Platform.Mapas.Destino =…
c#asked 5 years ago Bruno Gomes 117 -
0
votes1
answer897
views"The HTTP request was Forbidden with client Authentication Scheme 'Anonymous'"
I am trying to communicate my application with the Cadsus web service from an Asp . net core application. I have using the code below, but whenever I try to recover the return of the query I get the…
-
0
votes1
answer31
viewsException coming from a LIB and closing the system c#
I made a lib to manage the part of a system of mine, until then everything is ok, the problem occurs when this lib launches an Exception: public async void Update(ObjetoPostalModel objeto) { await…
-
0
votes0
answers17
viewsError of Input Characters
Good Night I’m making a registration system with mysql database, but I’m going through difficulties, I’m mounting the crud of displaying data is working perfectly but the insert I’m having trouble…
-
0
votes1
answer1174
viewsHow to pass Json parameters, to consume a C#API
I am trying to consume a Pay API transfer that asks to be passed the email of who will receive, the value and the description, I did according to the model below but I think it is not correct. Note:…
-
0
votes1
answer96
viewsHow to Cloud Forms in C#
I would like to know how I can cloud a (main) form, after calling another form or Messagebox.show(), to force the user to pay attention only to the active form or message. I have the following code…
c#asked 5 years ago Oto Emerson 25 -
0
votes1
answer53
viewsError making select with start and end date
I need to search the database for a list where it is necessary to filter by the employee, the initial date and the final date. However, when you pass the parameters and enter while, you jump to…
-
0
votes1
answer33
viewsUnique selection of Radiobutton
Hello, I would like to ask for help on the unique selection of a Radiobutton, I inserted two on my page and I wish only 1 could be selected if the other was automatically unchecked the other...…
-
0
votes1
answer129
viewsInstantiate list and Insert values at different times
Hello, in a web application, I need to insert values in a list at different times. This insertion occurs after the user fills in fields on the page and gives the Submit in the form. In Submit is…
-
0
votes0
answers33
viewsIt is possible for a Mysql Trigger to insert wrong values
I have this Sp that updates the stock: CREATE DEFINER=`comandas`@`%` PROCEDURE `SP_AtualizaEstoque`( id_prod int, qtde_comprada int, preco_vend decimal(9,2)) BEGIN declare contador int(11); declare…
-
0
votes2
answers137
viewsProblem sending data from a console application to Webservice
I have a console application that receives data from a mobile device, I am trying to send this data to a web service to process the data and fill them in the database. I’m trying this way: public…
-
0
votes1
answer91
viewsAssign a C# Class to a List<> C#, via Javascript code
Hello, I want to assign new filler lines by pressing a button without leaving the page. However, I need to assign a new class. I noticed that the C# function I put inside the JS function occurs only…
-
0
votes1
answer58
viewsHow to show a message on the screen if there are no records to be brought from the database?
I want to show a message on the screen instead of showing an empty table. How do I implement this logic in index.cshtml? @page @model xxx.xxx.Pages.Servicos.IndexModel @{ ViewData["Title"] =…
-
0
votes1
answer66
viewsPass data from a Datagridview in a Form to Combobox in another Form
good I am with problem that two days ago I can not solve , good I will explain: 1 - I have a datagridview with the database information. 2 - this information by clicking on the line of datagridview…
-
0
votes1
answer111
views -
0
votes0
answers17
viewsSubstring error: System.Argued tofrangeexception
I couldn’t understand how the calculation of substring in c#; The variable below contains 150 characters, I use the substring to receive a part of it, but an exception occurs even being within…
-
0
votes3
answers418
viewsC# - No argument provided that corresponds to the required formal parameter in abstract class code
There’s a error of arguments provided in 3 constructors of my abstract class code, where the method get() must be written in the child classes of the employee class which are the classes…
-
0
votes1
answer45
viewsNuget package versioning or Entity Framework versioning?
To create the project I am using the CODE-FIRST methodology, but to do some tests in the bank I had to do a Seeding Service (populate the database directly from the code ) for this I had to make…
-
0
votes0
answers41
viewsWhat is the PHP function that returns the same thing as "(char) integer"?
I have a code to convert from C# to PHP. This code has an integer to char conversion, and I’m not getting the same result. Note: I know that PHP is not strongly typed, but in version 7.1 (I am…
-
0
votes1
answer82
viewsHow do I convert the php array values to the "uint" type of C#?
I need to take each value of the index of the array and convert it to return the same thing that returns in C# when we use the function (uint). <?php $arr = []; $codigo = intval(123456); $v =…
-
0
votes1
answer102
viewsError while refreshing report Viewer C#
I’m having a problem running a report on Viewer in c#. The problem is the following I have to add a list in the data source, but it adds the first list, then no longer updates. What Can Be ? Code…
-
0
votes1
answer29
viewsHighcharts and C# - Javascriptserializer loses value after postback (with updatepanel)
I am building the category (Xaxis) and the data series in Highcharts through Javascriptserializer. The structure works perfectly when using in Page_load, but when postback (click on Asp button…
-
0
votes1
answer202
viewsDynamically referencing dll C#
During the development of an application that will connect to a database of different versions, a question arose whether it is possible to load the dll based on the version selected by the user.…
-
0
votes0
answers737
viewsWCF Error - Request cancelled: Failed to create secure channel for SSL/TLS
I’m having a problem when it comes to using the HttpWebRequest, the first time I call the method to effect sending an NF-e to Sefaz’s Webservices it performs normally but the second time I try to…
-
0
votes1
answer36
viewsError deleting with Restapi and dot net core 3
Good afternoon, I am mounting an application with . net core 3 and Rest api, all my methods(get, put, post) work, but delete does not. Trying to delete generates the following error:…
-
0
votes0
answers36
viewsError when doing POST on another project for the second time
Taking as basis this link, that it was myself who posted, I will summarize so that you understand quickly... I have a . NET Core 2.2 project and needed functionality that I only had in . NET Core…
c#asked 4 years, 11 months ago LeoHenrique 954 -
0
votes1
answer86
viewsdisplay multiple array by messagebox.Show on c# by clicking a button
people are creating a program to consult suppliers(being N suppliers), and I need that by clicking the button can see all registered suppliers and their information as this below : nomefornecedor1…
-
0
votes0
answers43
viewsHow to redirect to another API when the data sent is wrong?
What happens is this, I’m making a part of the system that will do the integration of customer data. The planned idea was the following, the client will access the API to make the persistence of the…
-
0
votes1
answer150
viewsGet line data after button click on an ASP.NET Repeater
Good evening, my question is this... I want to make a "select" of the data of a line of the Repeater control according to the clicked Linkbutton (the white pencil of blue background), thus storing…
-
0
votes1
answer183
viewsInsert using methods and classes in the C#database
Hello, good afternoon, sir! My problem is the following: I am wanting to run an Insert event, which in the database will add the (name, user, sector, position, shift and extension), but now I am…
-
0
votes1
answer117
viewsUse of the Htmlagilitypack library in C# code for variable value acquisition
Good afternoon Galera! Good people, I’m new here at Stackoverflow and this is my first post so please forgive me if I make any mistakes. I’m doing a C# program to take a picture of each person…
-
0
votes0
answers204
viewsMy aspNet core 3.0 project does not access the DLL generated by visual basic
I received a dll generated in vb6 to integrate with my api in Asp.net Core, na dll to various calculation methods. With this, I must invoke these dll methods in my Asp.net core 3.0 project in visual…
-
0
votes1
answer423
viewsHow to run an event in Codebehind being called by jQuery?
I have this code in Aspx: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="WebSite.View.Index" %> <!DOCTYPE html> <html…
-
0
votes1
answer951
viewsThread error: Control accessed from a thread that is not the one in which it was created
I have a code pad and I need it to run every x seconds, so I used the class Timer and passed as parameter the method I want to execute, and the times, start and interval. However the code is popping…
-
0
votes1
answer49
viewsHow to assemble a foreach list at different positions
How to assemble a list using foreach to change the positioning of the image. If my Count is 1, position the image on the left side, if my Count is 2 position the image on the right side, follow my…
-
0
votes1
answer52
viewsProject cannot solve mscorlib for Framework . NET 4.5.2
I have a C# Windows Form project that uses Framework 4.5.2. I bought a new notebook and I am trying to run this project, but when trying to run it does not appear any error and even then the project…
-
0
votes1
answer156
viewsRemove point and comma character and spaces from the last email in the recipient list
Hello, I want to send my emails as below: [email protected];[email protected]; but it’s giving me a sending error, because it’s taking the semicolon of the last address, when I put the emails in this way…
-
0
votes1
answer122
viewsRetrieving item from mongoDB array using C#
Good morning, I’m having trouble retrieving an array item within a Mongo document using C#. Below is an example of a document: {"_id":"5e1374ae38fa7026b88d4dc8", "Estacao":"NomeDaEstacao",…
-
0
votes2
answers104
viewsCombobox redeem ID value
public void SalvarProfessor(Professor professores) { try { AbrirConexao(); comando = new MySqlCommand("INSERT INTO professores (nome, idade, genero, email, id_especialidade) VALUES (@nome, @idade,…
-
0
votes1
answer36
viewsCount how many id you have in the table based on other data
Hello I’m trying to make a chart in aspnetcore using EF, I have a table Events in it contains a FK Idarea that determines the area of the event I wanted to count how many events you have of each…
-
0
votes1
answer102
viewsProblems in Object Reference not defined for an object instance
I have a problem with the result of the method SaveChanges(). I am trying to save a record, and it is persisted in the database, however the application is returning the message from exception:…
-
0
votes1
answer48
viewsI have a conversion error running a C#code
Running the code says the following: If I ok the application runs normally but the data entered in the database does not appear in Datagridview. What would be my error? using System; using…
-
0
votes1
answer50
viewsHow to put 'Ws:' only in the first xml node of a WCF service request?
I have a WCF application that has a vehicle.svc service as in figure 1. In the vehicle service.svc has a recording method that receives a vehicle DTO as in figure 2. public class VeiculoDto { public…
-
0
votes1
answer32
viewsSplit by modifying the sorting of the text file
I am loading a text file in a string [], later making a split because the file is separated by spaces, but I noticed that lines are with different sizes, this is hindering the capture of positions…
-
0
votes2
answers130
viewsHow to call an action as soon as the Web API starts?
I’m studying Web API and I’m having doubts about how to call an Action as soon as I click the Visual Studio play button. I imagine this should be done in the Main method of the Program class, but I…
-
0
votes2
answers217
viewsProblem passing Angular time to C# Core
The problem is to pass an hour value through an observable method (Angular 8) to a controller (C# Core 2.2), at the time of sending the data is correct: However, when I receive the values, it is…