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
answers69
viewsHow to invert grid data
I have a database with some tables to control software sales, and among these tables, I have software that contains the fields, beginning of the contract and end of the contract. Only when I select…
c#asked 8 years, 8 months ago Rennan Hanna 107 -
1
votes1
answer567
viewsIncrease the "text box" of the <Editor /> in Xamarin Forms
Save people! Would you know how to increase the text space in the Editor />" in Xamarin Forms? In the same way that we can increase an input /> in HTML with padding ? I appreciate any attempt.…
-
1
votes2
answers6013
viewsPrinting widgets from a list
Is there any way to read the values that are in a list and present them on the console? I tried it like this, but it doesn’t work Console.WriteLine(lista);
-
1
votes1
answer385
viewsTrying to update with Nhibernate?
I’m trying to do an update with Nhibernate but always returns me an error saying that there are two sessions open: illegally attempted to associate a proxy with two open session How to solve this ?…
-
1
votes0
answers40
viewsWorking with Entity Framwork and Sql Express Database
I have an application with a database connection and need to create an installer that contains the database script for it to be installed together with the application or at some point…
-
1
votes1
answer381
viewsSeparate Context Asp.Net Identity and Application Context
I am creating a repository using the Entity Framework, and the need arose for my entities to communicate with the entity Identityuser of Identity, only that Identity is on a separate layer of my…
-
1
votes1
answer105
viewsBackgroundworker does not receive selected Combobox value
I have an object Combobox and I am creating a Backgroundworker to add these objects to my database. Without using the Backgroundworker I can catch the selected object but when I use the…
-
1
votes1
answer1810
viewsHow to add lines manually in a datagriedview populated with Mysql data
I have a Datagridview where I fill it with data from a mysql table and then need to add lines with some textbox data, when I try returns the following error: "It is not possible to add lines…
c#asked 7 years, 5 months ago Lucas Lima 21 -
1
votes0
answers45
viewsDesign mode error in Xamarin
I have this problem in my project using Xamarin: I searched the Soen and found that, but it didn’t. What is missing is to uninstall everything and I have no guarantee that it will work. Waiting for…
-
1
votes0
answers282
viewsProblem with paging due to loading of Gridview and Dropdownlist on the same Page.Postback
Next, I have a gridview that it needs to be inside a postback to be able to perform an update when selecting a checkbox. The problem is that I have a filter using a DropDownList, if I leave mine…
-
1
votes1
answer146
viewsTopmost Windows Forms
I have two screens in Windows Forms that are enabled with Topmost, but when the second window opens, the first one (which also has top Most) is underneath, but I need both windows to be above…
-
1
votes3
answers55
viewsAutomatic punctuation in the lines of a Multiline Textbox
i need help, it’s like, I have to record the data from a Multiline Textbox to a Database, which is already working, but I have to do an automatic punctuation in that information that was entered by…
-
1
votes1
answer229
viewsUsability tutorial with transparency c#
I am working with c# and I need to do a usability tutorial, as well as in games that darken the screen, highlight a component and display a tip below. So far I made a Form on top of the other,…
-
1
votes1
answer455
viewsFilter database-level results Entity Framework
I have the following question about using the Entity Framework. I have an abstract class for the class that communicates with the base. Aiming at the performance want instead of bringing all the…
-
1
votes1
answer303
viewsChange the Formborderstyle property to None without losing the Sizable functions in C#
Hello, I’m a small problem, because I need to change the design of my Form related to your border, and the way I found in doing this was changing the property FormBorderStyle for None and making the…
-
1
votes3
answers338
viewsHow to anchor a redirect in APS.NET MVC
How can I send the user to a certain block of the page by passing the id to the url. For example: http://getbootstrap.com/css/#type, how to pass this type in ASP.NET MVC using the return…
-
1
votes1
answer404
viewsClear Panel from a Usercontrol
I’m developing an application where several Usercontrols will be shown in a Panel from the code below: UserControl1 u1 = new UserControl1(); panel1.Controls.Add(u1); And remove them from this code:…
-
1
votes1
answer499
viewsHow to dynamically grab the Content folder directory?
My question is the same as the title: how to create a variable that points to the Content folder? I have a file there and I want to access it. I tried so but unsuccessfully: StreamReader file = new…
-
1
votes1
answer264
viewsHow to select more than one txt file with C#
I’m writing a C# application that needs to receive more than 1 text file and display the Filename of them in a MessageBox individual for each. My question is in this import of the files, I was using…
-
1
votes1
answer379
viewsDo not go to another FORM1 while open FORM2 esiver
Suppose you have two Forms, the first Form1 is the main screen to which you give an option to open any other form, when any form is open, the user cannot go to the main form until you close/close…
-
1
votes0
answers116
viewsList multiple records from the same table
I need to make a screen to list multiple records of the same table being one in each field of this screen. The project is web, in ASP.NET MVC and I use SQL Server as a database. This is not a CRUD,…
-
1
votes0
answers274
viewsHow to import database tables to code with Entity Framework 6
In my project, I have only a few entities that are not connected to the database, but I run some procedures through EF6. These procs are only queries that bring data across information from more…
-
1
votes1
answer5121
viewsC# - How to add results from a SELECT to a List and use the list to Popular a Table
Everything all right? I’m new in C# and I’m stuck in a little problem with a project in Visual Studio: I am developing a project with DAO standard (DATA ACCESS OBJETC). I have an interface…
-
1
votes1
answer1377
viewsLinq with 2 different context using Inner Join
I would like to make a query in 2 different databases (2 Dbcontext) I tried it in several ways, one of them: I make a prequery in Dbmega context to recover the employees var FuncionariosLinq = (from…
-
1
votes2
answers71
viewsError while trying to change cursor during C#algorithm
Hello, I am developing a C# software to help in the scanning of old photos, and in the middle of one of the algorithms to process the images, I want the cursor to change to the loading mode so that…
-
1
votes1
answer87
viewsSingle entry on Asp.net form
I have a code that registers certain types of equipment, the form fields I have are: Name, Server, Type and Port of the equipment. I wish it was not possible for the user to register two equipments…
-
1
votes1
answer65
viewsHttpwebrequest.Getresponseasync is limiting to 2 simultaneous calls
I own an application where clients can download packages that are files . zip with an average of 1Gb. When starting a download, a new thread is created that will make the request and via stream…
-
1
votes1
answer82
viewsChange Menuit Popup Template in WPF
I am trying to modify the style of my Menuitems and their Submenuitems but the popup where Submenuitems are in a standard style. Just to be clear: Popup is standard Nacor of a WPF Window…
-
1
votes2
answers2537
viewsHow to Read and Convert . xsd Extension File to a C#Class
How to Read and Convert . xsd to a C# class for this purpose and convert the schema of the site Sefaz to can generate an xml with correct schema to be able to emit NFE.
-
1
votes2
answers622
viewsHow to Popular a Treeview with C#System Directories and Files
In my application (Windows Forms) I have to make a tree of directories for the user to search for a (or more) file(s) within his system. I saw on the Web how to make this tree in a Microsoft…
-
1
votes1
answer80
viewsRecover Sqlcommand as string
I need to recover a BD information with a select and compare with what the user is typing if it is different information, I allow the Insert. If the comparison is the same I do not let insert and…
-
1
votes0
answers57
viewsMarker Draggable without Longclick
At setting a Marker as Draggable(true), you need to hold clickado on the same to turn it "Draggable". I need that simply by dragging your finger on it, it drags. An example would be the 99taxi, who…
-
1
votes0
answers46
viewsChart.Js mousehover action
Hello, I would like to know how to increase the size of the "legend" in the mousehover action of the Chart.js.library. I read and did not find in the documentation, someone would know? follows image…
-
1
votes1
answer55
viewsado.net version of iis
Good, I have the following code: private void AspNet35() { String sWebSite = "W3SVC/1"; DirectoryEntry site = new DirectoryEntry("IIS://localhost/" + sWebSite + @"/Root"); try {…
-
1
votes2
answers1714
viewsSend a list of data in a viewbag and receive in a foreach in the view
The query data is correct, but I cannot return the data to the view. Controller: var disponib = (from d in db.Disponibilidade join c in db.Catequista on d.CatequistaID equals c.CatequistaID where…
-
1
votes0
answers93
viewsHow to create a setup using Inno Setup?
I’m having difficulty generating a setup of my application done in c# and Sql-Server 2018, according to some searches, I tried to generate a setup, generated but when testing it, this generate…
c#asked 7 years, 4 months ago António Mateta 159 -
1
votes1
answer50
viewsDLL created in c# fixed in the main folder
I am learning to develop C#Dlls, using Unmanagedexports to be exported to another language (Clarion) The DLL works, but with one exception: the application only "sees" the DLL in the main folder "C:…
-
1
votes1
answer179
viewsHow does class inheritance work in C#?
I have class 1 and class 2, class 2 inherits from class 1. Other classes that inherit from class 2 will inherit the attributes of class 1?
-
1
votes0
answers55
viewshow to create a Listview Menu
How do I create a menu with Listview, IE, the person clicks on a button, Ai aperasse a text in Listview when the person clicks on the text opens another form, How do I do this?
-
1
votes0
answers94
viewsGoogle Static maps no url limit
I wanted to create an image of several routes in google maps, I already used the encodepath to reduce the size of the url, I also tried to reduce the definition of coordinate points among other…
-
1
votes0
answers58
viewsDate Filtered Crystal Reports Export (C# Mysql)
I have a Crystal Report object that is bringing the records of a View from a Mysql database. I need these records to be exported to a CSV file and I got this with the following code: private void…
-
1
votes1
answer41
viewsGive preference to results that have the parameter passed in the Entity Framework
I am trying to implement a data solution that displays first the values that have the parameter passed to then pass the other parameters. Example: In a product table has the following data:…
-
1
votes2
answers190
viewsEntityframework Storedprocedure recover parameter output
How to recover the Output parameter of a storedProcedure? SP Example: create PROCEDURE StoreProcedure_Name @ParametterWithNummvalue varchar(50) = null, @In_Parameter varchar(50), @Out_Parameter…
c# sql-server entity-framework stored-proceduresasked 8 years, 8 months ago Alexandre Previatti 630 -
1
votes1
answer928
viewsBackup and Restore using Postgresql in C#
To back up or re-store a database through a C# application using the Postgresql DBMS, you need to send a command to pg_dump. It is possible to execute it via a select by sending an Executenonquery…
-
1
votes1
answer890
viewsCreate Database without Migration in Entity Framework Core
I am developing a study application in Entity Framework Core, and saw that through code-first it is possible to generate the database using the add-on commandMigration, but I wonder if there is any…
-
1
votes2
answers68
viewsViewmodel with INSERT in two controllers
I own two Controllers: 1 - Register the CPF (CPF, Name) 2 - CPF Phone Registration (CPF, DDD, Telephone) Viewmodel: using System; using System.Collections.Generic; using…
-
1
votes0
answers67
viewsRavendb - How to query words ignoring accent
I need to make a person name query ignoring the accent. Ex: in my document I have a record with the name "Leticia". If I refer to "Eticia" the result is empty. The behavior I need is to find the…
-
1
votes2
answers233
viewsproblems with string and split C#
I have the following function: string str = "1 2 3 4 5"; //string para separar string[] ArrayValor = str.Split(" "); //nesse caso o array seria {"1","2","3","4","5"} but wanted something more…
-
1
votes1
answer317
viewsPut the bug in my view
How do I play these messages in my view? Code that returns the message: public ActionResult SaveInternalAuditRecord(InternalAuditRecord criticalAnalysisRecord, string idResponsibles, string…
-
1
votes0
answers389
viewsError when connecting to Mysql database using C# application in Visual Studio
Hello, I created the registration form and at the time I will save the text box items in the database of the following error 'Host 'DESKTOP_R70LLO is not allowed to connect to this Mysql server'. By…