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
votes0
answers324
viewsSchedule patient hours every 30 minutes and save in mysql database
Good evening I need to make an appointment schedule of a medical clinic in C#. I need to list the office hours every 30 minutes, and keep only the appointment times marked in the database Mysql. But…
-
0
votes1
answer633
viewsHow to search for files recursively inside a folder?
I am developing an application, and I need to return the paths of files that have same name and same extension from within a specific folder, to assign a version there are them, but I do not know…
-
0
votes2
answers386
viewsLINQ to Entities does not recognize the 'Boolean Like' method?
I am having this error when trying to make one with query using LINQ to SQL after making the suggested changes: {SELECT `Extent1`.`idcliente`, `Extent1`.`nome`, `Extent1`.`pai`, `Extent1`.`mae`,…
-
0
votes2
answers1539
viewsPublish Windows Form C#
I have an application developed with Windows Form C# + Entity Framework V6.1.3, where I use an existing database. The application works correctly, in Visual Studio 2013, where I am developing. My…
-
0
votes1
answer2209
viewsHow to fill out a web form through c#
Is there any way to fill out a web form via c#? I have a system developed in WPF and when the user clicks a button open a particular page in the browser and your fields are filled automatically with…
-
0
votes2
answers1264
viewsSend message to browser
I need to send a message like this to the browser: How can I do on a site made with C#, ASP.NET and Webforms?…
-
0
votes0
answers119
viewsCreate Print method more easily
I have a form ready and I need to check the variables in the right fields, but I want a faster and easier way to do it. Because I don’t want to waste a lot of time doing the e.Graphics.Drawstring…
-
0
votes1
answer96
viewsError of arguments in Unity Photon
I was developing an online project and I cited the following function - PhotonNetwork.CreateRoom, and the following error occurred to me: Assets/Scripts/Sindico.Cs(53,31): error CS1501: No Overload…
-
0
votes0
answers287
viewsGet Formcollection in Page Navigation
In an ASP.NET C# MVC4 system I have some screens where I show some data. These screens have Filters and navigation (maximum limit of 10 data per page). I would like to know how I can record…
-
0
votes1
answer45
viewsUnity Error Developing an Online Project
How I fix this mistake? Assets/Online/Online.Cs(139,25): error CS0246: The type or namespace name `Playerbehaviour' could not be found. Are you Missing a using Directive or an Assembly Reference?…
-
0
votes1
answer222
viewsCheckbox validation in another form
Hello, everybody. Probably my doubt is a little too silly, but I did not find much similar on the internet... Could you explain to me how I can call the value of a CheckBox to another form? My idea…
-
0
votes1
answer95
viewsWhen I enter the system Choose a company to work for
Good Morning staff I need a help from you in my college project I am doing a stock system with 4 layers, I have a form that is registration company where user company that the user wishes to work,…
-
0
votes1
answer52
viewsReference error
Hello, I copied a Solution from one folder to another and started giving some reference errors, is an Asp.Net application that has a web API project. In the original folder the application is…
-
0
votes1
answer424
viewsClass Order to Serialize C Object#
I am working on an Nfe project, and have chosen to use serialization of a class based on the xml structure I want. I implemented the class, everything worked as expected, root, nodes etc, but I have…
-
0
votes1
answer131
viewsProblem with Textbox Update c#
Have: 2 Radiobutton 1 Combobox 1 Textbox The value of radiobutton chosen goes to the TextBox plus the value of Combobox. TextBox = RadioButton + Combobox But if I change, the value of Radiobutton,…
-
0
votes0
answers190
viewsHow to put multiple series in 3 dimensions in a highchart correctly?
My goal is to create a chart where I have the name, quantity and period. I am using Dotnet.Highchart in C# Webforms. My chart currently looks like this: And I even know why it’s like this, I’m just…
-
0
votes0
answers35
viewsHow to set or return the blank Datetimerpicker
How do I define or bring the datetimerpicker blank when starting the form and adding the date only when selected? I need to bring this blank component to add it to an employee’s admission date.…
-
0
votes2
answers224
viewsDropdownlist calls page load
I have a dropdownlist that takes data from the bank sql server. I carry that dropdownlist in page_load within a if(!IsPostBack){} and from what I understand of !IsPostBack, it only goes there if…
-
0
votes1
answer54
viewsCurrent size Textblock Runtime
Guys, I have a question that is the following. I am creating a Textblock at runtime with the following code: TextBlock txtMensagem = new TextBlock(); txtMensagem.Text = texto.Trim();…
-
0
votes1
answer201
viewsCatch problem with Mysql connection c#
Hello I’m a beginner in programming and I’m having trouble connecting Mysql in c#, where the code does not check and goes to catch action. Follows the code: conexaoDataSet = new DataSet(); conexao =…
-
0
votes1
answer48
viewsHow to calculate the first 4 bytes of an Address ex: 00F28758
I wish I could figure out how to calculate the 4 bytes of a address and then use a ReadProcessMemory. I just wanted to figure out how to calculate this because every time I try it goes wrong. Let’s…
-
0
votes1
answer1075
viewsDecrypt XML with digital certificate private password
I need to decrypt this XML: <?xml version="1.0" encoding="UTF-8"?> <xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Element">…
-
0
votes1
answer42
viewsTFS Api - Assign new work item to a parent
I am creating a new Workitem and need to change the responsible person(Field: Assigne To) for it. To create the Workitem I do as follows: WorkItem workItem = new WorkItem(workItemType) { State = "A…
-
0
votes2
answers69
viewsHow to use SQLITE Runintransactionasync
I need to insert a large amount of lines (exactly 221) when I start my WP application. Actually I’m using arrays and loop repetition for, so I’m losing performance when starting the app. I did some…
-
0
votes0
answers137
viewsTo find a list of classes contained in a C# Class Library using Mono with C++
I’m using C# to script through the project Mono with C++. I’m trying to get a list of all the classes contained in one DLL done on a project C# (which is a Class Library project). But I’m not…
-
0
votes2
answers1937
viewsiTextSharp - Dynamic table
I am trying via C# and with iTextSharp create a pdf doc with the following structure: I have a table with 3 rows In the first I have X columns with X years. In the 2nd one Row with the Months (J, F,…
-
0
votes1
answer183
viewsDisplay the full list of tables on an Oracle connection with Entity
As I do in a connection to the Oracle database, show all tables. made a connection and I have over 500 tables in the bank and only shows 74, that the three I need to mount the POC that I’m doing,…
-
0
votes2
answers94
viewsHow to obtain data entered in a form not yet recorded?
Hello, In an application using the MVC, how do I get the data typed by the user in a form, and before recording in the database, I return a view with the data entered for the user to check and only…
-
0
votes1
answer112
viewsKnowing Modelstate in javascript dynamically
I am developing an application in ASP.NET MVC 5 and I have a problem in putting a charging modal while the form is saved, because when there is something invalid in the form javascript does not…
-
0
votes0
answers57
viewsHow to get a piece of the Asp.net URL mvc5
I have the following URL: http://localhost:59278/video/categoria/desenho I’m trying to use the Url.Action to mount a URL that is based on the value of the current URL. I need to take the amount…
-
0
votes1
answer175
viewsData conversion error
I cannot open my user control form. private void usuáriosToolStripMenuItem_Click(object sender, EventArgs e) { Usuarios USU = new Usuarios(); sNome_usu = Status_Label_Usuario.Text;…
-
0
votes1
answer1021
viewsWhen consuming Recepcaoevent Error 215 Rejection: XML Schema Failure
I am trying to consume the event reception service on the farm, specifically inform science about an NFE: https://www.nfe.fazenda.gov.br/RecepcaoEvento/RecepcaoEvento.asmx But I got the following…
-
0
votes2
answers745
viewsField saves only date and part of time is "zeroed"
I have this part of code in my view. <div class="form-group"> @*@Html.LabelFor(model => model.DT_AGENDAMENTO, htmlAttributes: new { @class = "control-label col-md-2" })*@ @Html.Label("Data…
-
0
votes1
answer146
viewsJustify Text on Windows Phone
I have an application that the text is displayed in a textBlock and I want to make this text justified, I tried to put the alignment of the text as justified, but it was not, says that the method is…
-
0
votes1
answer68
viewsDo date conversion C#
I have a date "Wed, Nov 25" and would like to convert it to 2015-11-25 How could I do that?
-
0
votes0
answers96
viewsWhen I change the value of a Combobox they all change
I have a database with two tables, Tab1 and Tab2. On Tab 1 I have Cd_tab1 and Nm_object. In Tab2 I have Cd_tab2, Cd_tab1. The two are related. In my project I have 4 Combobox, all must represent the…
-
0
votes0
answers818
viewsBinding in Datagrid - Unable to access a discarded object
I have a datagrid with evaluations whose first column is PATIENT NAME. However, when it comes to placing Binding Paciente.Nomeit gives error. Within evaluation there is a patient object. DATAGRID…
-
0
votes0
answers462
viewsReportviewer with list of a table and information of another table
I have the following problem, I have a table AVALIAÇÃO and another PACIENTE. I need to generate a whole list of patient evaluations. I already have the query in my datatable that does this, however,…
-
0
votes1
answer74
viewsNull Reset,I made a check before entering the values and the error continues
I am having this error when in my program we have two classes with referenced methods. System.Nullreferenceexception was unhandled HResult=-2147467261 Message=Object Reference not set to an instance…
-
0
votes1
answer3029
viewsHow to compare the last character of a string with some letter or accent
I need to compare the last letter of a string with a question mark. I already did and the code works, only I’m getting the last letter with Substring, using Length and it’s an ugly code. I want to…
-
0
votes1
answer61
viewsList string in 2 MVC tables
I have 3 models: Pessoa, Catequizando and Inscricao. I intend to make a query that returns the name of the person where CatequizandoID = PessoaID that will appear in a dropdown view CriarInscricao I…
-
0
votes2
answers1568
viewsHow to display a modal using the c# and bootstrap button?
If you use the <button type="button" data-toggle="modal" data-target="#ConvenioOk">Teste </button> modal opens. But I have to use the C# button due to the event. The button calling the…
-
0
votes1
answer156
viewsTake a string snippet
I want to take the word "[email protected]" that’s inside that metromessagebox I tried that, but it didn’t work out: String[] palavra = ex.Message.Split(new String[] { "(", ")" },…
-
0
votes2
answers343
viewsHow is crud to update the records in SQL Server by Visual Studio C#?
I am using this code, it does not error but does not update the data public static int attLoja(LojaVirtual loja) { int resposta = 0; using (OdbcConnection conexao = ConexaoPadrao.CreateConnection())…
c# sql-server visual-studio sql-update crudasked 9 years, 6 months ago Nataniel Soares Rodrigues 155 -
0
votes1
answer234
viewsAllow only one instance
How to make my application run only 1 instance at a time? void Main(string[] s){ //faz algo }
-
0
votes0
answers71
viewsRun SQL command on a virtual machine
I have a form, which has the login and password fields. I want to do an update sql command on a virtual machine to which of course, whoever runs the program will not have privileges to execute…
-
0
votes2
answers1350
viewsRemove a column from gridview
I’m implementing a functionality in a project using Asp.net mvc and I’m trying to remove some columns from a gridview that I created in my application, the gridview datasource is a table in the…
-
0
votes1
answer70
viewsNuget package on local IIS or intra
I set up the nuget local and worked very well, both on my machine and on the network. What I want is to put the packages(DLL) in the IIS, so that when passing the address(URL) where are the DLL's,…
-
0
votes1
answer377
viewsCopy files showing progressbar
Good morning. I have a small code where I copy files from one folder to another, but as some files take time, I would like to show a progress bar, how can I do this with this following code: string…
-
0
votes1
answer126
viewsWhen I close the Form executes the Leave event
In my application I created an event Leave in the maskCnpj, when I close my form I have to click 3 times in the window messageBox there’s some way to settle this? if (maskCnpj.Text != " . . / -") {…
c#asked 9 years, 5 months ago Denilson Carlos 190