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
answer1614
viewsVisible but not yet clickable element
In my automated tests with Selenium, I have a method that waits for the element for a certain time, until the element is visible on the screen (Visibilityofallelementslodby). However, when the…
-
1
votes1
answer391
viewsProcess monitoring
I’m developing a process monitoring application, to get the running programs I’m using this class: Win32_process, but I am not able to find a method to discount idle time, for example I am only able…
-
1
votes0
answers113
viewsPrintdocument: Printing takes too long on IIS
I am with an automation project (Web Service) where one of the functions is to print a text file (simple) server side. This Web Service calls a dll composed of a "Printdocument" object and after…
-
1
votes1
answer116
viewsUse of threads in C# without storing in variable
If I start a thread anonymity: new Thread(chat).Start(); and would again instate it in the same way, it overlap the other thread? If not, how should you give a "Kill" in the first thread in…
-
1
votes0
answers334
viewsDynamic Flowchart C#
I have a program to create block flowcharts, each block with multiple inputs and multiple outputs. Within each block (object) I have a sequence of mathematical operations, which use the user-defined…
c#asked 8 years, 6 months ago Gustavo Meller 19 -
1
votes2
answers1778
viewsTrigger event when changing value of a textbox C#
Guys, I’m starting in c# and I’m having a problem. I’m working with Windows form. I’m using the Textchange event in a textbox, and with each key pressed in the field it triggers the event. I need…
-
1
votes1
answer225
viewsWhat is the best way to get the Radiobutton that was chosen by the user?
My program has 5 RadioButton in one of Panel that I didn’t rename and so it was Panel1, then only one can be chosen. I created a list of all the RadioButtons, after clicking on a button I tried to…
-
1
votes2
answers78
viewsHow I Address a Partialview ASP MVC
I have a View who has a div and within it goes a partialview EX: <div> @Html.RenderPartial("MeuPartial"); </div> In the right page render load, however, I needed it to render every time…
-
1
votes1
answer1927
viewsDisplay the return of a query with 2 tables in the same View in ASP.NET MVC
Controller: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using HelloMobile.Models; namespace HelloMobile.Controllers { public class…
-
1
votes0
answers40
viewsTrackbar component with two meters
I created a component trackbar with 2 meters , more when I manually rescan it on xaml , to barra and the marcadores disfigure and the barra rises and the marcadores go to the side. Code : using…
-
1
votes1
answer61
viewsSystem documentation in conversion
I am in the process of converting a system in Delphi to C# using the SCRUM methodology, until then there is no documentation of this system. So I would like to know what they indicate, I don’t need…
-
1
votes2
answers346
viewsShell Failure C#
Friends, I ask for help to solve a small problem. I am running SQL command through sqlcmd and Shell on C#, but the file is in a folder that contains "space", as follows. Path: D: Sandboxes\CIA…
-
1
votes1
answer416
viewsAsync Method with Await in his Return
public async Task<IHttpActionResult> NomeMetodo([FromUri] Filtro filtro) { return await Task.Factory.StartNew(() =>Ok(_aplicacao.RetornarDados(filtro))); } I wonder why the above method…
-
1
votes0
answers229
viewsUse C# GDI to customize printing
First of all I posted a question with the same code but the question was different. Anyway, I have this code for printing files (it’s a class derived from the class PrintDocument of C#) it takes a…
-
1
votes1
answer951
viewsError even having the click method
Please, can someone help me with a boring bug with ASP.NET? Next... I have a button: <asp:Button ID="cadastra" CssClass="btn btn-success btn-lg" runat="server" Text="Cadastrar Cliente"…
-
1
votes2
answers756
viewsCheckbox in Datagridview C#
Good afternoon. I have a datagrid view with a checkbox type column, tied to a Datatable with the checkbox type column as well. My problem is this: I have to go through a attendance list, if the…
-
1
votes1
answer89
viewsHow to load only the ID attribute in Many-To-One Relationship in EF?
I have two relationships Many-To-One in this class (usuario and projeto): public Atividade() { Projeto = new Projeto(); StatusAtividade = EStatusAtividade.NaoIniciado; TipoAtividade =…
-
1
votes1
answer1045
views -
1
votes1
answer164
viewsSave a photo to Windows Phone Gallery?
I am using the following code to save the image in Isolatestorage: String tempJPEG = "/Shared/Media/card.jpg"; using (IsolatedStorageFile myIsolatedStorage =…
-
1
votes0
answers45
viewsAdobe Acrobat X Pro - Export PDF to accessible text
I am in a project reading PDF through C# 2012 with ASPOSE. However I am having difficulty reading pages that have several columns. For example: a pdf can have on page 1 (one) two columns and on page…
-
1
votes1
answer165
viewsWebapi problem when trying to Deserialize object with property of the same type (circular reference)
I’m doing some tests with WebAPI, to see how it behaves with circular reference, and found a curious case. Model [DataContract(IsReference = true)] public class Pessoa { [DataMember(EmitDefaultValue…
-
1
votes1
answer141
viewsc# hexa conversion
I need to create an array of bytes with the following content: byte[] arr = new byte { 0x4f, 0x4e }; I happen to have the string "ON", where "O" = 4f in hexa and "N" = 4e I have tried directly…
-
1
votes1
answer96
viewsHow to List Products from One MVC Distributor
I have an application that manages the Distributor and its Products. I want to list only the products of the Distributor I selected, but in case everything is appearing. I tried to do so: public…
-
1
votes0
answers829
viewsHow to distribute a C# project that uses "Localdb" to an "other computer"?
I have a College project in C# to finish. The application works and all functionalities have been implemented. I’m using Visual Studio 2015’s Localdb v12 in conjunction with Entity Framework. The…
c#asked 8 years, 5 months ago user3254272 19 -
1
votes0
answers47
viewsReferencing parts of an external program C#
I need to reference the input (textBox) login from a program running on my PC. You would know how to tell me how to do this? I need to capture the login typed in the external program by my program…
-
1
votes1
answer32
viewsForeign Keys from an Sqlconnection.Getschema()
It is possible to get the name of all the Foreign Keys of a bank without I have to select? I tried for Getschema and I found all PK, IX, UQ, except FK.
c#asked 8 years, 5 months ago Felipe Deveza 166 -
1
votes1
answer217
viewsSlowness with Fluentnhibernate
I am using Fluentnhibernate in a simple product registration application. The first time I run something that accesses the database (product query screen or register a product) the site is loading…
c# asp.net-mvc nhibernate fluent-nhibernate asynchronousasked 8 years, 5 months ago Vitor Ferreira 48 -
1
votes0
answers154
viewsQuery using Firebird "SUBSTR" with Inline, QueryOver, Criteria
Guys, I need to create a query using the "SUBSTR" function of Firebird with Line, queryOver or Criteria. I have option to create with HQL or SQL, but these would be my last options. Anyone have an…
-
1
votes1
answer229
viewsCan I create modules in Asp.net mvc?
I have a home page with contact and such, like other pages. On the page I have a Login button and when I click the same redirect to a project module. Example: Home localhost/Home/Index Login…
-
1
votes1
answer294
viewsHow to make the Split in some lines except specific?
I want to make a dynamic list that uses the Regex.Split separating each item by the character of a new line, except when you’re in the fields ( ... ) in my lines of code, as follows the example: var…
-
1
votes2
answers619
viewsHow to get data from two tables in the same column?
I have two tables in the database: Tabela1 Id Nome Sexo 1 NomeA Macho 2 NomeC Fêmea Tabela2 Id Nome Sexo 1 NomeB Macho 2 NomeD Fêmea I would like to have the following result: Id Nome Sexo Tabela 1…
-
1
votes2
answers170
viewsHow to edit a Partial Class?
I took a project from a client, and there’s a class that’s on a partial. When I click to go in the reference opens the file, but in the project I can’t find the file, and has the following text in…
-
1
votes1
answer567
viewsPlacing a dynamic Youtube video in an <iframe> (Asp.net)
Good night! I am trying to put a youtube video based on a url saved in an sql database, the problem is that the way I thought of putting, works only with some static url, in the following way:…
-
1
votes2
answers1191
viewsCsharp Fill Combobox with query, but bring already selected the option saved in the bank
I have a product registration screen with a LOCAL Combobox. Product table has the LOCAL ID, called pro_local. And the local table the fields loc_cod and loc_descricao My combobox is filled with the…
-
1
votes3
answers1866
viewsBringing Winform Window Forward
There are some parts of my application that need feedback from the user, such as asking if you want to update, or on the system activation screen, but sometimes these screens, or messagebox, are…
-
1
votes0
answers120
viewsAllowing the transparent background of a web page to go through the rest of the windows in a webbrowser control
I am trying to make the transparent background of a page in webbrowser control remain transparent by allowing the user to see what is under that window, that is, only HTML elements that are above…
c#asked 8 years, 4 months ago David Amaral 81 -
1
votes1
answer497
viewsChange Connectionstring only in Runtime memory
In the App.config of my application I encrypted the Connectionstring, now I need to decrypt in Runtime but not updating in the App.config file. I am using the following code, but the same ends up…
-
1
votes0
answers149
viewsForm creation sometimes lags behind main form
Person, I am creating my children in the following way. BuscaUsuario _chld = new BuscaUsuario(); _chld.ShowDialog(); _chld.Dispose(); It turns out that if the user presses alt+tab or for example if…
-
1
votes1
answer1270
viewsRead file that is on Solution in C#
I created a file on Solution of my project. How do I read this file? He must stay in Solution because when compiling it should be packaged in the . exe.
c#asked 8 years, 4 months ago Jeterson Miranda Gomes 672 -
1
votes3
answers6938
views -
1
votes1
answer569
viewsHttpwebrequest with SSL
When I have to play a few steps (GETS and POSTS) of an access all https using .net I need the use of ServicePointManager.ServerCertificateValidationCallback. Then there came my doubt, it is…
-
1
votes1
answer258
viewsPre-select Last Record in a Dropdownlist c#
I’m assigning a list to the DataSource, and in this assignment I am concatenating the code with the company name, however, it loads the list with the first selected item. How do I have the last…
-
1
votes1
answer1315
viewsWebbrowser problem to click on elements of the site
Hey there, guys! I need to access this link: https://br.answers.yahoo.com/question/index?qid=20140809134831AAoevh8 Using IE, Chrome, Firefox... any browser I can normally with no errors, but when…
-
1
votes2
answers772
viewsRegister only some data from a C# Asp.net MVC 5 form
I have a person registration form, where I also already register her address, there arose the need to be able to register more than one address for the same person at the time I am registering her,…
-
1
votes0
answers22
viewsGet value from an html Windows Form c#
Hello I would like to take this value, it is a class inside the other, I am trying this code but it does not return the value. private void button1_Click(object sender, EventArgs e) { string s =…
-
1
votes0
answers87
viewsWhat is Entityframework and how do you use it with C# and connection to Postgreesql and Mysql databases?
I’m programming a CRUD of ADO students with C# and Mysql, my algorithm teacher told me about the Entity, but I can’t find anything clear that makes the connection between the banks. Somebody explain…
-
1
votes1
answer282
viewsTempdata works on Localhost but doesn’t work when published
Thank you in advance for your attention! I am developing in ASP.NET MVC5 What happens is this: when the tests are carried out in the localhost, this code works perfectly. I can retrieve the tempdata…
-
1
votes1
answer640
viewsHow to use C# Windows Forms with Firebird and Object Orientation?
I recently learned a little object orientation and c#. But I am trying to create an application that is developed in c# windows Forms, with database Firebird and object-oriented. But what’s the…
-
1
votes1
answer75
viewsError in WPF application, but only on some machines
I made a small application to extract a file .zip. It works, but when I run on three other machines, it doesn’t work. The error is this: An error occurred while creating ZIP file Undefined object…
-
1
votes1
answer1762
viewsRemove Datagridview line Windows Form C#
I’m trying to delete line by line on DataGridView, these lines would be in case files (attachments) without any database connection, only the following error message appears: It is not possible to…
c#asked 8 years, 4 months ago Ronaldo Amysterdam Alves Neres 33