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
votes2
answers143
viewsASP Net Core - Server receives multiple GET requests repeatedly
Hello, I have a server hosted on an EC2 instance, Ubuntu Server on Amazon AWS. No one is making requests to this server, however, logs presented in Cloudwatch indicate multiple GET operations…
-
0
votes1
answer185
viewsProgressbar with Timer
I have an app with a Splashscreen where I have the ProgressBar barraProgresso. The goal is that once it is 100% loaded, open another form and close the Splash. The problem is that when there is a…
c#asked 6 years, 5 months ago Daniel Santos 555 -
0
votes1
answer220
viewsHow to declare and pass a decimal variable from XAML to C#?
<StackLayout> <Label Text="Digite um Valor:" Margin="10" HorizontalOptions="Start" VerticalOptions="Start"/> <Entry Keyboard="Numeric"/> …
-
0
votes0
answers208
viewsWeb api c# relationship between tables
I’m trying to make the relationship between two classes "Tables". I am mounting an API for MVC5 EF6 in Visual Studio however I need information from one class to appear in the other. public class…
-
0
votes2
answers462
viewsFind out how many are older in Windows Forms app
I’m trying to do a C# exercise using Windows Forms that are older than 18 years. The algorithm should read the age of 10 people. But when I run the program it lets me just type an age. public…
-
0
votes1
answer52
viewsView select ASP.NET Sqlserver
I’m maintaining 1 controller and I’m taking the data from my database and trying to display it in the view, however I can’t pass select to the view, can anyone help me? i need to pass all select…
-
0
votes1
answer458
viewsMonitoring of Printing Spool
I’m trying to make an application that monitors my printer and when the user sends a print of any program, it captures that information, pauses the print and opens a new window for the user to enter…
-
0
votes0
answers17
viewsOrigin of the Dltextbox component
I’m making an adjustment on a Windows CE project, but this project had its source code lost and the system went through a reverse engineering process. Knowing this, I started researching the type of…
-
0
votes1
answer426
viewsHow to create a controller with data from another table in ASP.NET?
I don’t know how to properly create an Employee Controller. The Employee class is linked to three others, being CBO, Company and Department. So in the database schema, they get these three primary…
-
0
votes1
answer27
viewsproblem while removing tab from a tabcontrol c#
I’m trying to remove a tabcontrol, this tabcontrol is with the cef open (browser with google Chrome engine) in it I have a button called exit. He’s raised that way: TabPage nova = new TabPage();…
-
0
votes0
answers157
viewsManipulating TXT files with MVC
I’m developing an MVC app, see below: Registrorep.text 000185000|3|13072016|2357|12942973988 000185001|3|14072016|0000|127396685 000185002|3|14072016|0800|12519046076…
-
0
votes0
answers45
viewsHow to turn my query into a Linq query?
I need to mount this query in Entity select ped.Id, prot.Prot_numero as Protocolo, ori.Descricao as Sistema, cla.Id as Equipe, cla.Descricao as Finalidade, forn.Nome as Fornecedor from Pedidos ped…
-
0
votes1
answer123
viewsPopular a View with values in the ASP.NET MVC model
In the Index Method I can set values in the model and initialize my VIEW with predefined value. But when I do the POST for the START method, when I change the Aquedica property, the value is not…
-
0
votes1
answer810
viewsEdit text file on a specific line
I have a txt file that informs me 3 fields: error line, wrong number and number to replace. However I am not thinking of an instruction to go directly to the line I need, this file follows a layout.…
-
0
votes0
answers38
viewsBundleconfig Class Registerbundles method without absolute paths or fixed Uris
If I am here it is because I have not been able to find at the moment something exact or that satisfies my problem. Let me explain: I’m using the SONARQUBE or just SONAR for code evaluation, error…
-
0
votes1
answer91
viewsC# - Asqueryable - Condition (Linq - Lambda)
In this method, I populate my 'rule' variable with all rules coming from Select, however, I would like to filter only Status = True. How to do this? public async…
-
0
votes1
answer945
viewsjava.lang.Nullpointerexception error when sending data to a web service
I have a webservice where I’m sending some data. The return of the service is returning me this message below, in the integration manual, says it would be an internal error, wanted to understand if…
-
0
votes1
answer53
viewsReplacing Checkbox with a String
I need to show off "Active" or "Inactive" in the column Situation of Datagridview, how to do ? This "Situation" Column is of the Boolean type: This is the code where I fill out the Datagridview:…
-
0
votes1
answer24
viewsCreate new file by discarding current XML lines C#
I have an XML file like this: <?xml version="1.0" encoding="UTF-8"?> <Message> <MessageId> <ServiceId>SolicitaLogon</ServiceId> <Version>1.0</Version>…
-
0
votes2
answers212
viewsSearch in lambda query with logical operators
I have a query for a report, where some search fields are optional, except the date ranges. However, when performing the query, the function always returns me values that do not match the parameters…
-
0
votes0
answers83
viewsRepeater, Table and Updatepanel - Not Working Correctly (ASP.NET)
I would like your help with Repeater, Table and Updatepanel together on ASP.NET using c #. What do I need? I have category and items (with weight) and the user needs to set a note for that item. In…
-
0
votes1
answer509
viewsCall Form2 with Circular Progress Bar while another action is executed C#
I have a question about a Windows Form call. In this application, through the button click event located in Form1, call a second Form, where in this form2 I present an animated Circular Progress Bar…
-
0
votes1
answer189
viewsHow to Replace XML C#
I have a method that receives some parameters, I would like to replace some xml information, at the moment I can only remove and add new information private void CriacaoDoConfirmarLogin(string…
-
0
votes1
answer777
viewsPost method is not running on Postman
Creating a method POST and testing by Postman, I can’t access the Controller that POST. I haven’t implemented much yet, but I should stop at Break if, of course, it was working. Controller…
-
0
votes1
answer179
viewsColorize Datagridview with comparison C#
I wonder if there is any way to color datagridview line without using a loop. I have a minimum stock and when available is below the minimum would like to paint the red line. I did it that way, but…
-
0
votes1
answer36
viewsIs there a need for ". this" in an Android Xamarin project?
I’m rewriting an application that was originally written in Java in Android Studio. Now I’m rewriting in C# for Xamarin Android, so a doubt arose me, in several classes I came across the java code…
-
0
votes1
answer227
viewsASP.Net and C# - Reducing dropdown options according to current date
On my client’s website, I have a dropdown list with the months of the year. Unfortunately, the value property has months written instead of numbers. <asp:DropDownList ID="ddlMesReajuste"…
-
0
votes2
answers51
viewsError Backing Up Windows Forms Database
Guys are having trouble solving this problem! My application is in Windows Forms. I need to perform Backup of data through the application itself, but when I run to perform it informs me of this…
-
0
votes1
answer63
viewsWhen injecting a controller dependency, Postman returns error
By doing it in mine Controller: [Route("api/[controller]")] public class OptOutClientController : Controller { IOptOutService _service; //Se comentar o construtor dá certo public…
-
0
votes0
answers162
viewsWhy are these errors appearing in Razor when compiling the project?
Changes made by me @model Pessoa; // já tentei module3.Models.Pessoa e todas as variacoes possiveis @{ ViewData["Title"] = "Pessoa"; } h2> @ViewData["Title"]</h2> <p>Name: @model.Nome…
-
0
votes1
answer1250
viewsConsume SOAP from a Rest in Asp.Net Core 2.0
I re-asked the question, trying to improve it for better understanding. 1) I created a WCF service, called Optoutservice.svc. In this service I have an interface and a class that implements this…
-
0
votes0
answers30
viewsHow to ensure password security when extracting a Securestring in C# WPF
I was reading about Securestring and what she can offer. However, I am in a scenario where I have a Passwordbox and I want to extract the password of this component, encode it in hash and then…
-
0
votes1
answer118
viewsError trying to register in C#
I am creating a program and I need the user to register to log in. When running the program, when I try to register this error appears in Visual Studio: "The model backing the 'Banco' context has…
-
0
votes0
answers42
viewsDoubt in the Sendbird API to create a chat
Good evening, everyone, I’m doing a little project and I’m using the Sendbird API to create a chat, however I’m finding problems when receiving the message that was sent from one user to another,…
-
0
votes0
answers38
viewsHow to cache a json Xamarin IOS request
I’d like to know how to do cache of a request Httpclient whose return is a json and determine the amount of storage days of that cache. public async Task<List<Categoria>>…
-
0
votes4
answers486
viewsHow to break line using Streamwriter?
I have this code that generates a log always when the service ends, but it can happen to have unprocessed NF and I need to list it to be easy to identify. Example 100 NF were not processed. In this…
c#asked 6 years, 5 months ago Igor Carreiro 1,917 -
0
votes0
answers98
viewsErro Crystal Report
I am updating a . rpt, which worked perfectly, but I had to make some changes, and it returns me error: Follow the code of how the Crystal Report is loaded: SqlConnection connection =…
-
0
votes0
answers67
viewsUpdate value in database when changed cell value in Datagridview
I am using a local database created by a Database class and I would like that when I changed values in the Datagridview cells in the Sign Up Clients screen, that same value was changed in another…
-
0
votes1
answer45
views -
0
votes1
answer100
viewsString with Mark in C#
I’m developing an application that passes some information to users who are running it. The main idea is to make an informative track, however I have two problems that should be simple, what I would…
-
0
votes2
answers116
viewsHow to use the same instance for multiple classes?
Below I will try to give a value to the progressiBar that is in the class Controles. The method of Form1, will call the class method ManipularProgressBar to change the Control value ProgressBar…
-
0
votes1
answer147
viewsError Method Update EF Core with Firebird 2.5
When trying to update an entity Firebird is returning me this error "Implementation limit exceeded block size Exceeds implementation Restriction", simply take the entity of the bank and have it…
c# firebird entity-framework-core firebird-2.5asked 6 years, 4 months ago Lucas Riechelmann Ramos 521 -
0
votes0
answers154
viewsClear Fujitsu Fi-7160 buffer scanner in c#
I’m working on a Company project, C# Windows Form and I’m still a beginner on the dot net platform. I would like to know with friends by profession, if there is any way I can clean the buffer of the…
-
0
votes0
answers120
viewsThe Viewdata item that has the key 'Categoryid' is of type 'System.Int32' but must be of type 'Ienumerable<Selectlistitem>'
When I Create a New Subcategory I Have the Following Error: The Viewdata item that has the key 'Categoryid' is of type 'System.Int32' but must be of type 'Ienumerable'. Classes that are using:…
-
0
votes1
answer236
viewsHow to solve this diamond inheritance problem
Can anyone solve this problem (diamond heritage) with the use of Interfaces and post here in c#? I found it in this post: Why C# does not allow multiple inheritances? but I couldn’t solve it.…
-
0
votes0
answers48
viewsHow to save and change data in the database using checkstate from a checkbox
Good afternoon, I need to save the information on condition, because when registering the patrimony I made a checkbox that represents whether the patrimony is internal or external. If it’s checked,…
-
0
votes1
answer97
viewsImage upload using Picturebox - windows Forms
This is Galera, good morning! I have a small problem and I can’t solve it, it’s the first time I’m using c#Picturebox, my application is Windows Forms. and I’m making a record using photo! but when…
-
0
votes1
answer178
viewsMalformed XML NF reference element Version 4.0
I am updating our service notes sending program (Sorocaba). Doing a quick survey I saw some comments that after updating the . Net Framework, microsoft performed a fix on the Signatures…
-
0
votes1
answer471
viewsHow to select the contents of a column coming from a Dataset C#
Is there a better way to search for the content of a specific column? I have information that repeats in a "template" column I want to retrieves this content only 1 time. I’m doing it like this, but…
-
0
votes1
answer70
viewsList items in addition to the database in Combobox in c# winforms
I have an application in C# that performs a search. For this is used a field called 'status' that is no longer a list in a combobox. I need it to appear beyond the status that comes from the bank, a…