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
votes1
answer184
viewsProgress when requesting to download a file with Fileresult
How can I display a progressibar while the server processes a Fileresult return? I tried to perform the operation with Ajax, but it is not possible to download a file via ajax without redirecting it…
-
1
votes0
answers457
viewsC#-Inserting images into a database
I’m doing a product registry. I can insert the image but when I use a combobox to make all the data appear the image is cut in half. Here is the code of the insert button: byte[] imageBt = null;…
-
1
votes1
answer33
viewsSearch for data not committed
I was doing some tests with respect to transactions and I saw that if I perform a search of the data registered and not committed they are returned. In Entity Framework this doesn’t happen, and so I…
-
1
votes2
answers191
viewsError Log Generation Aspects by XML
I have an application developed in C# that uses an SQL Server database, this application is made available through a virtualized application server, I do not have direct access to the database nor…
-
1
votes1
answer101
viewsError compiling Monodevelop Project
I’m developing an application with C# in monodevelop, everything was going great, until when I extend the Form class and get the following error:…
-
1
votes1
answer287
viewsMVC Helper Menu
I’m having some difficulty in assembling a Helper to assemble the system menu This is my view @model…
-
1
votes1
answer96
viewsLambda com List
I have the classes: public class Modulo { [Key] public int ModuloID { get; set; } public int SatisfacaoID { get; set; } public virtual Satisfacao Satisfacao { get; set; } public virtual…
c#asked 9 years, 9 months ago Diego Zanardo 3,301 -
1
votes1
answer370
viewsSqlcommand and Executereader parameters
I can’t get bank values and direct a form according to what "profile" is in the users table, if I take the part of ExecuteReader, works the login, however, I need to check the user profile, my code…
-
1
votes1
answer1523
viewsDrive of Forms c#
I have a menu and some children Forms...and I want them not to be able to click the form and drag, as I do ? I want him to stand still in the position and size I put.
-
1
votes0
answers40
viewsHow to make graph with triangles?
Well I’ll try to be very explanatory: I wonder if there is possibility to use Chart and make triangles in it by passing the 3 coordinates to generate the triangles, as in the image: (Don’t worry…
-
1
votes1
answer433
viewsText editor for email formatting
I need to create a page for creating and formatting emails. Which text editor is most reliable for doing this? I say this because some email viewers are very limited and do not interpret some HTML…
-
1
votes1
answer875
viewsHow to send an object to an Asp.NET C#webservice?
I need to send an object from a class that I created to a webservice, but when I call the method passing the object it to the types are incompatible. I tried to receive the object as Object, but it…
-
1
votes3
answers861
viewsTime Count For Move (Threads)
What you need to answer the question is comments in the code: using System; using System.Threading.Tasks; class Program { static void Main(string[] args) { player1.Start(); t.Start(); while…
-
1
votes2
answers474
viewsError "'Object' does not contain a constructor that takes 1 Arguments"
I wonder why this mistake is happening. I created one class that extends another, but when I call her builder (parent class) it makes an error. Ali says that there is no constructor with 1…
c#asked 9 years, 3 months ago user22408 -
1
votes1
answer120
viewsAsp.Net Drop Down List
How do I pass one dropdownlist by parameter? I tried to pass, for example: public void preencheDrop(string SQL, WebControl x) { método aqui. } but I couldn’t. This method I just want to make my life…
-
1
votes0
answers323
viewsHow to use Bundle.config in webforms
I wonder if I can and how to use the bundle.config that is used in MVC, in webforms. I learned that there is this possibility but I did not find anything on the net. So I would organize the CSS and…
-
1
votes0
answers435
viewsEdit doc file through C#
I have a program that generates barcodes, inserts them in a file . txt and prints this file. What I want is for those barcodes to be inserted into a file doc with a paper label template (in this…
-
1
votes2
answers5590
viewsWindows Service - Error 1053 on Start
Hello, I have a windows C# service that I have to install on several clients. My problem is that in some clients I can install and it works normally, but in some clients I can install the service…
-
1
votes0
answers71
viewsConfiguring a DSN via C#Code
Hello found this article talking about how to do Configuring a DSN via VB Code. Is there any way to do the same in C# for a connection to BD Mysql? Thank you... VB - Configuring a DSN via Code…
-
1
votes1
answer58
viewsProblem in code C#
Does anyone know what the problem is with this code below? The following error is occurring: "The stream is not writable" TcpListener tcpl = new TcpListener(500); tcpl.Start(); Socket sock =…
c#asked 9 years, 3 months ago Nickolas Carlos 632 -
1
votes0
answers81
viewsGeneric Handler - Parser Error, Could not create type
Next guys, I made a simple Generic Handler, just to give me back one person, just for the record, the code is this way public void ProcessRequest(HttpContext context) {…
-
1
votes1
answer2284
viewsEnable or disable navigation buttons C#
In the Binding Navigator from my table I have the following buttons: inserir, cancelar edição, excluir e salvar (figura anexa). I wanted to leave the inserir and excluir disabled when starting an…
c#asked 9 years, 3 months ago Denis Liberato 13 -
1
votes1
answer805
viewsDevelop in C# using Mono Develop Linux
I need to program in C# and use Linux. I read a little about Mono Develop, I would like to know in what functional aspect Mono is owed or stands out in relation to Visual Studio and if there are…
-
1
votes1
answer914
viewsC# MVC5 - Using Outputcache
I recently started studying the OutputCache and its uses due to a use in a corporate system. I’m using the OutputCache to load all menus that a user (logged in) will have access to. However, I want…
-
1
votes1
answer368
viewsPlay an html class within an Asp.net code
I have that code: <%# Eval("DsPathDocumento") != null && !String.IsNullOrEmpty(Eval("DsPathDocumento").ToString()) ? String.Concat("href='/UpLoads/", Eval("DsPathDocumento"), "'") :…
-
1
votes1
answer640
viewsDates with JSON /Highcharts
I have a problem with dates while plotting a Highcharts chart using JSON object. Data referring to date information is being displayed as follows: The Server sends JSON as follows to the client:…
-
1
votes1
answer1145
viewsWhat is the difference between Int32 and int in C#?
In C#, use String or string, Int32 or int, among others, there is no difference, in thesis. Anyone knows if this difference generates any impact on the performance of high complexity applications?…
-
1
votes2
answers188
viewsMemory allocation of a service
I have a problem, I need to check the amount of memory that a specific service is allocating. Is there anything in C# that does this? Some class or method? For all that I have seen, bring the…
c#asked 9 years, 2 months ago Felipe Rosa 11 -
1
votes1
answer8181
viewsHow to make a button with rounded corners in C# (Winforms )
I’m trying to customize the appearance of a button, basically I’m trying to customize the edges, background, font color and round the corners of the button. I was able to do everything except round…
-
1
votes1
answer209
viewsExtract . zip with status
How to extair . zip files in a way that I can see the status of the items being extracted. Ex: static string GetStatus() { return "Extraindo... " + current_arquivo; } Using Ionic.Zip’s Opensource…
-
1
votes1
answer442
viewsProblem with Mysql Connector
I am using MVC 3, Entityframework 4 and Mysql database. I hosted my application on Locaweb. Unfortunately, I can’t connect the same thing to the database. Running the application on my local machine…
-
1
votes1
answer438
viewsPanel can’t give a Visible=true on it
I have a panel and inside it a Repeater with a table. This panel is inside a user control. I use this UC in several situations. I created a method called AplicarCaracteristicas, Depending on the…
-
1
votes0
answers37
viewsIs there a function to remove accents in strings c#?
I have an "Academic" string, for example, and I need to return this string as the id of a div in html, and for that I want to return it without the accent.
-
1
votes1
answer45
viewsCode abstraction with multiple Replaces
I have this code pad: xml = xml.Replace("<html>", ""); xml = xml.Replace("<head>", ""); xml = xml.Replace("</head>", ""); xml = xml.Replace("<body>", "<certidoes>");…
-
1
votes0
answers111
viewsGrouping Radiobutton in Windows Form
Everyone says that it is enough to place a container object (Panel, Groupbox and etc) and inside it the Radiobutton controls that the container groups. However, there is no way to work with the…
-
1
votes1
answer574
viewsDoubt when generating a. doc file with C#
The below method downloads the document that is generated dynamically, but when the file opens it shows a file conversion option, leaving the item marked by default Unicode(UTF-8). What to do not…
-
1
votes0
answers34
viewsProblems with updating datagrid C#
I have a code that’s responsible for scrapping stocks of a particular product in a product chart... it cuts the stock down without a hitch.. but when I go to the Product Stocks Search Form the…
-
1
votes2
answers1260
viewsConsume Webservice from an external link
While consuming a webservice an external URL via the link in the browser http://api.postmon.com.br/v1/cep/30640-240 returns the following JSON message: {"complement": "from 9201 to the end -…
-
1
votes1
answer904
viewsHow to recover all the events that are in Fullcalendar?
I have a page that has a list of events that can be dragged to a Fullcalendar. After dragging all my events to Fullcalendar and clicking the finish button I want to get a list, or something like…
-
1
votes2
answers264
viewsEnable Keypress in Panel C#?
I have an app and it works like this. I have a code to create TextBox dynamically when the maximum amount of letters in the TextBox1 for 2. Here is the code: private void VerificaTextBox(int…
-
1
votes0
answers80
viewsReportview - Records per page
I have a DataSet populated with two records and would like to print the first record on one page, the next on a new page, and so on. This is necessary to print badges on a Sp35plus.…
-
1
votes1
answer59
viewsGet Type from a class without instantiating it
I need to get the Type of a class without instantiating it, I tried to do that way: variavelQualquer.Type = new ClasseA().Type; // Type é uma variável pública que guarda o valor do método GetType()…
-
1
votes1
answer190
viewsStatic Method in Interface
I have a class to encrypt data. But it will be used as a DLL, and for that I need to create an interface to show the methods( tested without the interface and it didn’t work). However, it contains 2…
-
1
votes1
answer178
viewsC# + Postgresql = strange character
Greetings Galera I am working with C# Windows Forms and have already done some tests with postgresql using version 9.1 and everything seemingly normal. But I came across a bench in version 8.4,…
-
1
votes2
answers811
viewsRecord and recover information in files
How do I write data to a file and then recover it? I have a enrollment system. I start a folder in Windows and within it I generate the enrollments sequentially. I finish and go home and the next…
-
1
votes2
answers196
viewsError closing Forms
I have the following code snippet to close my application. private void frmAgent_FormClosing(object sender, FormClosingEventArgs e) { if (MessageBox.Show("Deseja realmente fechar o sistema?",…
-
1
votes2
answers8286
viewsNo constructor without parameters has been defined for this object
I am building an ASP.NET MVC5 application using DDD and have separated my Ioc layer from my web application. In my controllers I have constructs with parameter to receive an instance of my service…
-
1
votes0
answers362
viewsDecrypt xml file by passing certificate password
I need to decrypt an XML file, but already passing the certificate password. I can do similar actions, such as signing the file without the certificate driver requesting the password. Follow:…
-
1
votes0
answers51
viewsPass values from a Gridview to a database
I would like to know how to take the values of a gridview in windowsform and pass to my database in Access.
-
1
votes1
answer164
viewsDependent executable files available to the user
I got a problem with my setup of Visual Studio 2010, I made an application that the form main has several Forms dependent and when the setup from it and perform the installation of it, in the…