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
-
1
votes2
answers85
viewsLow Performance when viewing Datatable C# - Plan Coded Ui Test
I’m having a little trouble checking the numbers of a DataTable-X with a DataTable-Y, I have to check if the number of DataTable-X exists in the DataTable-Y (and if the DataTable-X with the data of…
-
1
votes2
answers43
viewsverify that Radiobutton with Repeatdirection, generated in Datagrid are checked
I have a Radionbutton with Repeatdirection which is generated on my Datagrid, yes and no button. <asp:TemplateColumn HeaderText ="Reevio" ItemStyle-Wrap="false" ItemStyle-Font-Size="8"…
-
1
votes1
answer111
viewsChart with horizontal scrolling c#
Good morning guys, I’m drawing a line chart on a pictureBox with "drawline"s concatenated. Basically what I want is to create a horizontal scroll bar to navigate the chart, that is, to be able to…
-
1
votes1
answer380
viewsRead Html from a web page by running an application in wpf c#
Good night, I have a task to be able to create a desktop application to read the HTML of a page. With some searches I managed to create a method that reads the HTML and returns me a string, follows…
c#asked 5 years, 10 months ago Hudson S. Carlos 1 -
1
votes1
answer1450
viewsProblem with accents, C# App Console
Read and save the file public void LereGravar() { Console.WriteLine($"{DateTime.Now.ToString()} - Processamento Iniciado, Lendo Arquivo"); //Procura dentro da Pasta DirectoryInfo Dir = new…
-
1
votes0
answers43
viewsUse EWS API with C#Reflection
I am trying to use the EWS API in SSIS Script Task, but the server does not have the corresponding dll: Microsoft.Exchange.WebServices.dll So using Reflection is the only solution I found, the dll…
-
1
votes2
answers650
viewsSave file with openFileDialog
I need to select PDF files with the openFileDialog and save them in a specific directory set in a string in Properties.Settings, but the code below does not work. private void…
-
1
votes1
answer291
viewsHow to load data into a combobox whenever registering new values
How do I make sure that each course registration is automatically updated the course combobox without having to close and open the application again? Ex: I register a course "Administration" and…
-
1
votes1
answer326
viewsHow to consult Reinf-2099 - Inquiryreceipt event2099
I am trying to query the Receiptent2099, however I do not know the correct form in the documentation speaks the URL and the method and also the parameters, I created an xml with the parameters and I…
-
1
votes1
answer130
viewsHow to convert and save Datagridview data to Mysql database
I have a field in the Mysql database of type Double(10,2) and a grid where the field is like this: VALUE: R$10,00 When I try to save from error by saying: The input character string was not in an…
-
1
votes0
answers38
viewsData transmission with Arduino
I’m monitoring 3 analog inputs of one Arduino UNO and I don’t know if the way I’m sending data to serial is correct, because when I try to receive the information in another language(C#) does not…
-
1
votes0
answers44
viewsHow to change the System.Web.UI.Webcontrols (Treenode) dynamic "Id" in c#
I’m new to the subject, and I’m creating a dynamic structure of treenodes, in this structure the id of the nodes, is automatically implementing, but I’d like to define the id of the nodes, so it…
-
1
votes0
answers64
viewsI am unable to validate the authenticated user
PROBLEM: I am unable to validate the user authenticated by the database. What happens is that when I run my application, putting valid user and password, it returns me false inside my loginOk…
-
1
votes0
answers163
viewsProcessing of data received by the C#Serial Port
When I read the data from the Serial port in C# and add in a String RxString i receive the following strings: "??\u0002???? u0002???? u0002???? u0002???? u0002???? u0002????? u0002????..." or "????…
-
1
votes0
answers95
viewsSNMP problem in C#
I am developing an application that performs collections SNMP on a given server. I am using the library SnmpSharpNet. I’m getting to do the normal snmpwalk in a certain OID. However, there is a OID…
-
1
votes0
answers155
viewsError query in database: here is no Row at position 0
I am trying to make a query in the database when calling my method and Row error occurs at position 0. public Cliente ConsultarCliente(long? id) { Cliente item; DAL acessarBanco = new DAL(); //…
c#asked 5 years, 10 months ago Thiago Correa 47 -
1
votes1
answer55
viewsHelp with a Dropdownlist
I’m having trouble recording the value of my dropdownlist in the bank. When I do Debugger I realize that I am saving the ID values and not the selected items. How can I fix this. This is my View:…
-
1
votes1
answer54
viewsError during Page Deletion - Xamarin
I’m new to mobile programming, so I wanted a help to treat an error that seems not set by the IDE (Visual Studio). The case is that I have a screen that wanted to insert that carousel with…
-
1
votes0
answers46
viewsHow to fill a property (type Object) from a form
I have the following code @model ModelTransaction <div class="form-group"> <label for="name">Conta:</label> <select asp-for="Account" class="form-control"> @{ foreach…
-
1
votes1
answer36
viewsProblem with Inotifypropertychanged C# WPF
Guys I’m having a question, I’m messing with c# WPF vs2017, and I did the following: every class I put Inotifypropertychanged and added: public event PropertyChangedEventHandler PropertyChanged;…
-
1
votes0
answers41
viewsDoes not enter into Oracle bank, with Nhibernate
I have a problem in an application, developed in C#, that uses Oracle database, and access the database with Nhibernate. When trying to perform the Saveorupdate() function, the Insert is not done…
-
1
votes2
answers63
viewsProblem Trying to query Application c# + Database
I’m making a list of customers, but is returning this error: System.Argumentexception: 'Column 'Cpf_cpnj' does not Belong to table .' This column, Cpf_Cnpj, is in my database: I can’t solve this…
-
1
votes1
answer383
viewsError deserializing Model JSON data
JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'SoftluxWebCore.Models.Tabelas.Financeiro.CaixasModel' because the type requires a JSON object (e.g.…
-
1
votes1
answer50
viewsHow to pass a decimal type variable to a string type sql command with decimal separator "."?
I have the following Model class: public class ModelTransaction { public int Id { get; set; } [Required(ErrorMessage = "Informe a data")] public string Date { get; set; } [Required(ErrorMessage =…
-
1
votes0
answers129
viewsHow to filter data by category in Entity Framework Core?
I am trying to filter the data from a query based on the parameters gestorId, projectManagerId and recursoId, however, I’m not sure if this is the best way to do this. I also need these parameters…
-
1
votes1
answer1105
viewsProblem Injecting a Service into the Controller: An unhandled Exception occurred while Processing the request
I’m getting error below when trying to inject a service into a controler. I already checked my configuration on Statup.Cs. Error: An unhandled Exception occurred while Processing the request.…
-
1
votes2
answers517
viewsPass parameters through the url
I’m trying to pass a parameter of my view to my controller by the url and I’m not getting it, as you can see in the code below I’m using viewbag, I don’t know if it’s an error on the route or…
-
1
votes0
answers74
viewsI’m doing the game Nightmares from Unity and in the playerMovement script my character just doesn’t rotate looking at the mouse
This is my code, I thank you in advance for your help. using UnityEngine; public class PlayerMovement : MonoBehaviour { //velocidade do jogador public float speed = 6f; //vetor responsavel pelo…
-
1
votes0
answers38
viewsWebservice - Sending objects via Httpget
I’m developing a service Get data with feedback in JSON, following the model below: Survey: { [SchSISQST].[Qst]. QstAltDat [SchSISQST].[Qst]. QstNom [SchSISQST].[Qst]. QstAtvSit…
c#asked 5 years, 10 months ago Leandro Azevedo 303 -
1
votes0
answers92
viewsC# web scraping that has Silverlight
I’m making a web scraping, I was able to automate until a certain part, but when it arrives at a certain moment, the Site opens the Silverlight,. I would like package tips or as I can do to get to…
-
1
votes1
answer63
viewsRemove Devextreme text
How can I remove the text and write down the text box in my form ? I need to remove the text Ban nome:, I need only the text box (css is not ready yet)…
-
1
votes1
answer249
viewsViewing PDF file after obtaining bytes
I would like to view a file .PDF staying at a FTP. I can get the Stream through the bytes, but I can’t create the file in a browser. Follow the code so far: private void btnVerFilePdf_Click(object…
-
1
votes1
answer60
viewsZoom in graph C#
I have a line chart with values from 0 to 5 for Y in my application C#. As most of the time the enough values to be drawn are 2 to 3 I would like to zoom vertically. float atualdata_1, calibracao =…
-
1
votes1
answer1434
viewsHow to execute a command in CMD or Powershell, passing the commands via C#?
I need to execute a command on CMD that I pass the parameters via C# for example: "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\mysqldump.exe" --column-statistics=0 -uroot -p1234 -hservidor -P3306…
-
1
votes0
answers233
viewsLogged-in User appears in Main Form C#
Good afternoon!!! I have a problem that I don’t know why... I have a program in a Windows Forms C#. It has a Login window that goes into a Main window. I use the same principle of storing the…
c#asked 5 years, 9 months ago Rodrigo Garcelan 11 -
1
votes1
answer154
viewsError while converting JSON
While converting my data I get the following error: Input string '42.0' is not a Valid integer This error happens because I get a value string "42.0" in a field int -> Con_codigo How can I…
c#asked 5 years, 9 months ago Jeff Henrique 1,020 -
1
votes1
answer36
viewsModify Displayexpr
I have the following code: groupItems.AddSimpleFor(m => m.Bcx_codigo).CssClass("lbcod") .Editor(e => e.SelectBox().Width("300px") .DataSource(ContaBancariaController.ListaBancosBuscados)…
-
1
votes2
answers577
viewsEFD-Reinf: What can be done to avoid certificate failure?
I am working on sending information from EFD-Reinf and I am facing shipping problems. Based on the code posted here to make the shipment, however always falls in the catch of WebException with the…
-
1
votes1
answer56
viewsProblem with Datareader together with Thread
I have a problem adding the returned data from a Select in the Datagridview. The problem actually occurs when I make use of backGroundWorker next to a ProgressBar. The specific code that performs…
-
1
votes1
answer97
viewsEdge doesn’t cover everything
My edge doesn’t cover everything as it would like, how could it make the edge go up before the end of the Limite ? Meu css: .conteudo { padding: 20px; } fieldset { border: 1px solid #000; padding:…
-
1
votes1
answer34
viewsError handling in Datagridtextcolumn
Inside a Datagridview I have a text field and I’ve tried everything but I can’t validate it. Example: 1 - Delete columns with product name and price. 2 - There are these Datagridtextcolumn that the…
c#asked 5 years, 9 months ago Cristiano Almeida 11 -
1
votes1
answer55
viewsGetproperties() except Notmapped
I have a method that searches all the properties of my model, but I would not like to bring the entities that have as DataAnnotation the attribute NotMapped. Method private IEnumerable<string>…
-
1
votes1
answer33
viewsWhy access to a Session within an Actionfilter is behaving this way
Greeting to all. I am developing an application in Asp.NET MVC5 and found a following problem: The application needs me to log in from any screen it accesses via browser. To decrease the amount of…
-
1
votes2
answers122
viewsSQL-C# ~ Add Student if not in class
Good morning, I have the following code below: public void AdicionarAlunoTurma(Adicionar_Alunos aluno) { List<string> parametros = new List<string>(); StringBuilder query = new…
-
1
votes1
answer79
viewsHow to clear a Modelstate error with specific property?
I created Asp.net mvc core 2.2 project with individual account. Follows code: [BindProperty] public InputModel Input { get; set; } public class InputModel { [Required(ErrorMessage = "O campo…
-
1
votes1
answer28
viewsGenerate a Partial Model from a complete Model
I have a Model called: Cliente_man that represents the customer register. But this Model, has a lot of information, and to the screen that I am developing not ah need of all, so I would like to move…
-
1
votes0
answers216
viewsHow to send PDF to Webservice - Asp . NET
I am having trouble sending a PDF to a Web Service. In case, the documentation is this way: then I made the following code: private async void EnviarDocumentoWhats(string pdf) { using (var client =…
-
1
votes2
answers127
viewsPrevent Insert or Update If date is in a Registered range
I am with the following doubt: I have the table: Escala Data_Atuacao_Inicial, Data_Atuacao_Final, tipo The guy can be 1 or 2 I want to create a Rigger to stop the Insert or update of this table, if…
-
1
votes1
answer478
viewsHow to place routes with optional parameters Asp.net-core
I wish my route was this way [HttpGet("APIPassword={APIPassword}/AvatarUUID={AvatarUUID}/Idioma?={Idioma}")] Where Language is Optional…
-
1
votes1
answer371
viewsHow to fix Blinking Panel (Flickering Control) when drawing something?
I made an example when this happens pisca-pisca, just put the control Panel in the form and execute. public Form1() { InitializeComponent(); this.KeyDown += Form1_KeyDown; this.KeyPress +=…