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
answer428
viewsRegister/Display List C#
The function of this code is to read the information : Discipline name,4 notes and the average The problem : I cannot carry the data in a List in the Form Cadastrar and display the information in…
-
0
votes1
answer183
viewsHow can I for timers who were initiated by a task c#
Hello, I’m trying to understand a situation but so far I haven’t been able to solve it. Imagine that we have an X class that has a timer that is started by the constructor. Now imagine that this…
-
0
votes1
answer155
viewsConflict when opening multiple screens in the menuStrip - Visual Studio
I have 3 forms. Parent Form (Main) Child Form (Services) Child Form (Suppliers) What’s happening.. I block the person from trying to open more than 1 time the same form, but when they try to open…
-
0
votes0
answers74
viewsHow to create a 'next record' button of a BD in C#
Hello, I’m trying to make a Windowsform with a button 'next' to display data in some Textbox see image: This button is just an alternative, it should go through all the BD records from the first IF…
c#asked 7 years, 2 months ago Fellipe Signoretti Feitosa 13 -
0
votes3
answers257
viewsEvent onclik button in dynamic html Stringbuilder table
Good afternoon people of the forum, I’m trying to add a button in a dynamic html table to redirect to another page by passing parameter through the url. But I’m not getting it via javascript. I’m…
-
0
votes1
answer1632
viewsCommunication problems with the government-provided web service
I’m having a problem communicating with eSocial webservice, my certificate is correct, but still can’t establish a secure connection, it presents the following message: "Error making HTTP request to…
-
0
votes2
answers161
viewsHow Forms are opened - Visual Studio
Good morning, My problem is that when I start the program it gets like this: That is, the form child nor scroll bar has there cut the other options To solve, I maximize the parent form, but it looks…
-
0
votes1
answer45
viewsEnable tab in Readonly = true fields | Visual Studio
Hello, I have this code in the Combobox event, when I select who is a Physical person it enables the relevant fields and blocks those of "Legal" person and vice versa. However it is still possible…
-
0
votes1
answer1012
viewsEntityframework: There is no mapping of the Objectparameter object type to a native type managed provider
I am developing an MVC application with Entity Framework in Code First. As my database has procedures, I opted to use Sqlquery to execute the procedures, but I am thinking about this error: Não…
-
0
votes1
answer159
viewsVirtual method with Generic C#
I am creating a Base Form where I am not using it of type "Generic" due to problem with inheritance of forms in C# with the same. In this base form, I had the need to create a virtual method with…
-
0
votes1
answer221
viewsHow to create a Users access history from a Desktop app
I am creating a desktop application (Commercial System) using C#. I have a table of Users registration in which will be registered all employees who will log in to the system. In the registration…
-
0
votes0
answers162
viewsAdd Font to Bundleconfig
I’m looking to put a source who is in a link, tried these two ways and none works, simply my page does not load the source. It follows codes: First form: var linkFont =…
-
0
votes1
answer141
viewsApplication Xamarin.Forms stopped out of nowhere
I was making a code to receive notification and suddenly the application does not run anymore. Compile, Deploy, but it takes time to consume the service and appears this message: O Android project…
-
0
votes0
answers85
viewsUnity: distance with addforce
I’m creating a game where you apply a certain force to the block and it walks vertically and it has to stop at a certain point and I want to do this by AddForce. But on paper, I’m using the formula:…
-
0
votes1
answer340
viewsHow to use Asnotracking when working with Repository
I have a generic repository and I have a Controllers for each entity of mine. eventoContactIdOcorrenciaRecebida = dtoEventoContactId.ObterPorCodigoEvento(Convert.ToInt32(codigoEventoContactID));…
c#asked 7 years, 2 months ago Edivan Medeiros 3 -
0
votes3
answers97
viewsHow to write times on console entries without repeating too much code
I wish that all Console.WriteLine this way when sent to the Console: [10:38:12:758]- Message typed in writeline Well I’ve already done a part that’s this: private static DateTime data =…
-
0
votes0
answers28
viewsBest way to build a class to run an SQL package
I am building a layer of access to the database and I need to access the functions inside a package on the oracle server. Orm already connects to the database and accesses tables and procedures…
-
0
votes0
answers445
viewsView with filters and grid in Asp.Net MVC
I am new to Asp.Net MVC and need to create a View similar to the following image: In the "Filters" frame the user will select the filters to be used in the query and click on the "Filter" button to…
-
0
votes0
answers71
viewsHow to implement a Pushnotification
I know I need a notification server for this. I chose firebase because it is free and does not require a credit card. What I want to do: 1) When the user changes the flag in the database, then a…
-
0
votes1
answer1271
viewsError CS0012 The type 'Client' is defined in an Assembly that is not referenced
Handling class with RU: ContextEF Contexto = new ContextEF(); public List<Cliente> Listar() { //var query = from c in Contexto.Cliente // select c; return Contexto.Cliente.ToList() ; } Onclick…
-
0
votes1
answer123
viewsChange Gridview
I’m having a problem changing some information, in case I need to change two columns of a gridview, but they are coming directly from a database I need to change these two fields(Id_category and…
-
0
votes0
answers293
viewsError compiling Xamarin.Forms project
I’m making that mistake: The "Xamlctask" task was not instantiated "C: Labs FCM-Xamarin-Forms-master FCM Packages Xamarin.Forms. 2.2.0.45 build…
-
0
votes0
answers60
viewsError of: Unauthorized Error
I downloaded a project to test sending push notification. I am trying in various ways and without success. This project is from a guy named Habibali. When I spin it gives the error of Unauthorized…
-
0
votes1
answer70
viewsIs it possible to create a class from a Forms opening routine? How?
I have several forms that I’m 'instantiating' by the event click on the toolstrip, but it seems that it is getting polluted since all codes do the same routine changing only the parameters. Event to…
-
0
votes2
answers67
viewsSelect line in datagridwier and write to the database
I have a datagridviwer populated by a query of the sql database, in this datagrid I have a column with a chekbox, now comes my doubt, as I write to the database when the line has been selected by…
c#asked 7 years, 1 month ago Junior Guerreiro 617 -
0
votes1
answer325
viewsInsert date written to the textbox in a certain format for the database
Code: private void button1_Click(object sender, EventArgs e) { conn.Open(); using (SqlCommand cmd = new SqlCommand("INSERT INTO (StartDate) VALUES(@StartDate)", conn)) {…
-
0
votes2
answers78
viewsWCF does not connect to Sqlserver when published on IIS
I am using WCF + Sqlserver, when running by Visual Studio works perfectly, when I publish and update on IIS an error occurs: "A network-Related or instance-specific error occurred while establishing…
-
0
votes0
answers76
viewsProblems changing line color of a Datagrid in C# Wpf
I am having problems changing the color of the Datagrid lines, I use the following function int i = 0; private void gvDados_LoadingRow(object sender, DataGridRowEventArgs e) { DataGridRow rowContext…
-
0
votes2
answers544
viewsASP.NET Core Attribute routing
I’m migrating a project to ASP.NET Core 2.0, but I’m unable to use the following routes. Error message. An unhandled Exception occurred while Processing the request. Ambiguousactionexception:…
-
0
votes2
answers270
viewsHow do I compare values between two tables and send email if it has new value?
My system imports every day CSV files from several directories into a table called TB_ARQUIVO. In this file, it contains the name of the Hotel (HOTEL_NOME column) and four types of Channels...…
-
0
votes1
answer1076
viewsConsume SOAP12 NF-e UF BA
Good follows the code , in the end put the error note the same code works for GO State (Goiás) static void Main(string[] args) { try { var req = new RequestWS(); var xmlDocument = new XmlDocument();…
-
0
votes0
answers721
viewsHow do I get my App to receive even closed or blocked notification
If I lock my Cell screen and leave the App open, I get Notifications, but if I close the App I can’t receive any more. The problem that when it started working, was getting in all situations and…
-
0
votes1
answer296
viewsI cannot use the Date field. I am using Asp.Net C# MVC
function set_dados_form(dados) { $('#id_cadastro').val(dados.Id); $('#txt_Nome').val(dados.Nome), $('#txt_Telefone').val(dados.Telefone), $('#txt_Endereco').val(dados.Endereco),…
-
0
votes0
answers51
viewsC# - Additional information: Out of memory
Good afternoon, I am with the following error in my solution I do not know how to solve thanks to who can give me a hand. private void btnSeleciona_Click(object sender, EventArgs e) {…
c#asked 7 years, 1 month ago AlltairMentor 11 -
0
votes0
answers49
viewsHow to Reverse an animation (run it in reverse) via pure shampoo
I did an animation Storyboard Abram menuzin and so far so good, I’ve done it before reverting the animation by c# //pode estar errado mas foi mais ou menos isso sb =…
-
0
votes1
answer233
viewsUploading files (images) in ASP.net does not send the image
I can’t send images (banners) in my Asp.net application My controller : [HttpPost] [ValidateAntiForgeryToken] [ValidateInput(false)] public ActionResult Save([Bind(Include =…
-
0
votes0
answers285
viewsCall Controller Search Action
I have an action in my controller that calls a service that does a search using stored procedure and returns a list to me. I made the form in the View to call this Action, only it’s not calling…
-
0
votes0
answers650
viewsMaxreceivedmessagesize (6553 6) was exceeded. How to resolve?
I am consuming a web service by SOAP, but the following message is displayed: The maximum quota size of incoming messages (6553 6) was exceeded. To increase the quota, use the Maxreceivedmessagesize…
-
0
votes1
answer122
viewsError trying to save information to the database via Entity Framework
My project has the following classes: public class Manifestacao { public long Id { get; set; } public string NumeroChamado { get; set; } public virtual Cliente Cliente { get; set; } public virtual…
-
0
votes0
answers38
viewsSlowness in Entity C# when saving image
I’m slowing down the system I created in c# using Entity Framework. At the moment when I am saving a record of an attachment, I am compressing the file. Before I check if it is . jpg or . pdf (only…
-
0
votes2
answers269
viewsReturn last record from table
I’m trying to make a method that returns the last record of the table but gives error: Failure in operation"coditem" public int UltimoItem() { con = conexao.obterConexao(); try { cmd = new…
-
0
votes1
answer132
viewsHow to make a deserialize in a Json with C-Sharp
I have the following code private void WbRanking_DownloadDataCompleted(object sender, DownloadDataCompletedEventArgs e) { RunOnUiThread(() => { string json = Encoding.UTF8.GetString(e.Result);…
-
0
votes1
answer259
viewsUpdate a CSV line without having to go through it all c#
Could I update a specific line of the CSV file? i have the information of which line I want to add information, currently I have the code that goes through the file and when it arrives in the line I…
-
0
votes0
answers38
viewsInsert is not working / Excel
I created a process to make a Insert in a spreadsheet on EXCEL but the data is not being entered. No error is returned. Code: private void AtualizarPerformanceEntrega() { try { DataTable dt =…
-
0
votes1
answer237
viewsCalling variable object from a string
I’m trying to call an object from a string, which contains its namespace, class and object name, however, all of these are variables and do not have a fixed object type I found a similar question,…
c#asked 7 years, 1 month ago Leo Longhi 1,209 -
0
votes3
answers838
viewsCheck Whether Datagridview field of type Datagridviewcheckboxcolumn is marked
I have a dataGridView and do the check to see if in the column of type Datagridviewcheckboxcolumn there are any selected lines. If there is at least one line with this selected field executing an…
-
0
votes1
answer213
viewsBlank tablix
I tried using Report Viewer, but the data from Tablix is blank Load from the form: reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("Tablix1",…
-
0
votes0
answers73
viewsDoubt about c# int [-1,1]
Good person, I made a script where he exchanges objects with setactive in int connected to onclick buttons 1,2,3,4 and so on I ask help from you to change the int to -1.1 on the onclick buttons the…
-
0
votes2
answers8176
viewsCPF Mask and Date of Birth Asp.net MVC
My question is this: I created a simple CRUD and I want to use mask in the fields date of birth, CPF and phone. Function code create of the CRUD: @model WebApplication1.Models.Bdfinal @{…
-
0
votes1
answer21
viewsI cannot implement a Sfdatagrid
Trying to follow a tutorial here to create a Sfdatagrid, but it’s not working. I’m very doubtful about how to implement it. My Model Class namespace Autorizador.Model { public class LiberacaoGrid {…