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
answer824
viewsCalculate change between textbox?
Good evening, I have 3 textbox, and I would like someone to provide a code to help me, when I select the product on the grid the total value is added in textbox1, and so on, the more I add products…
c#asked 9 years, 2 months ago Rennan Hanna 107 -
1
votes1
answer235
viewsRegex to capture text block
I need to extract blocks of text that are inside #Regions: #region VARIAVEIS GLOBAIS string aux1 = "teste"; string aux2 = "teste2"; ... #endregion The return would be: string aux1 = "teste"; string…
-
1
votes1
answer492
viewsHow to get the neighborhood through geolocation?
All other fields return normally through geolocation, only the neighborhood comes blank. What is wrong?…
-
1
votes0
answers27
viewsValidations of the Identity
I’m not able to find where Identity does the validations, I’m having trouble registering a new user. Does anyone know where this is validated ?
-
1
votes1
answer296
viewsHow to use Autofit in C#?
I am exporting data to an Excel spreadsheet and am unable to use Autofit, someone could help me? Code: public void exportarExcel(InformacaoDB info, string nomeArquivo) {…
-
1
votes1
answer42
viewsHow to execute code before starting to change orientation?
I’m wondering if there’s any event or way to run a piece of code before it happens to change directions on Windows Phone. My problem is I need to close one MenuFlyout before changing orientation,…
-
1
votes1
answer422
viewsHow to handle code in a DLL?
The barcode is being generated through a class of a DLL downloaded from the internet. I need to change this bar code, but this class is blocked. How can I do a trick?
-
1
votes1
answer347
viewsChanging a linkbutton’s Text attribute inside a table in a Retpeater
I have this linkbutton: <td><asp:LinkButton ID="lkbEnviarDocumentos" CssClass="acessos" Text="Documentos" runat="server" /></td>} %> When that condition is true…
-
1
votes1
answer423
viewsMake anime and manga gallery in c# desktop
For you to read an online manga, you have to go to some sites like "Mangasproject" to see what was released and view the manga to read. I want to do an anime gallery to store photos and description…
-
1
votes1
answer1576
viewsRunning methods through configurable keyboard shortcuts
I’m developing a system that has some functions (e.g., F12 -> Close the system). In the system has the form of parameters, and in this form I would like the client to choose which shortcut for…
-
1
votes1
answer505
viewsInheritance with Relationship of 0:N using Nhibernate
I have the following situation: Person public class Pessoa { public Pessoa() { Endereco = new List<Endereco>(); } public virtual int IdPessoa { get; set; } public virtual string Nome { get;…
-
1
votes2
answers665
viewsBootstrap Collapse
I’m creating a list using the collapse in an interaction of loop, but are all starting open, I would like only the first item of my collapse stay open. If you double-click on one of the items, it…
-
1
votes1
answer167
viewsDeploy Windowsforms with bank . mdf
I made a program in Windows Forms (C#) in layers. Model DAO BLL Interface Create a Database (Generator.mdf) in the Model Project and its Context (edmx). Now I want to publish, and how do I get the…
-
1
votes1
answer1688
viewsSecure backup using Mysql and C#
My application is C# and BD is Mysql, when I do the backup he creates a arquivo.sql. That one arquivo.sql can be easily edited in a notepad, or any other editor, thus leaving my comic very truthful,…
-
1
votes1
answer416
viewsChange of Users
Good evening guys I’m doing a project in college and I came across a problem a while back and I couldn’t solve it. I have the Login screen and within the system I have User Exchange and when I call…
c#asked 9 years, 8 months ago Denilson Carlos 201 -
1
votes1
answer155
viewsThread starts but there is no reaction
I’m in a little trouble that when I start one thread with a normal function or the tasks of the thread are fully completed and the thread is finalized! But I need to start one thread that causes a…
-
1
votes2
answers80
viewsError trying to define or read the value of variables already defined - System.Nullreferenceexception
I’m having trouble with this code. Whenever it rotates, it causes an exception of the type System.NullReferenceException. // Clear out the Array of code words wordBuffer = null; Int32 syntaxCount =…
-
1
votes1
answer1662
viewsFloating point result for decimal variable
I have the following variable: decimal resultado = 0.0m; I need to assign the result of a division to that variable: resultado = (1 / 2) * (-1); The result has been 0, but it should be -0.5. I…
c#asked 9 years, 1 month ago Jedaias Rodrigues 6,718 -
1
votes1
answer626
viewsHow can I show the next 7 Days (Calendar) C#
Hail, good night I am working on a C#solution, where I have to develop an agenda and at some point I intend to show the events (if any) as well as show the following 7 days, even if they are not…
-
1
votes2
answers189
viewsByte Array x Stream
I’m developing a WCF service that will convert files. I will upload and then download the files. The files are not large. What is preferable in the case of sending and receiving, returning an array…
-
1
votes2
answers608
viewsWeb Service Mail Test - SSL Error
Has anyone ever had this problem referencing web service for testing and implementations of the post office. I need to perform some validations but I can’t execute any method without SSL errors.…
-
1
votes3
answers2429
viewsCalling event from within code
I have this event in my code: protected void rdbGarantiaConfissao_SelectedIndexChanged(object sender, EventArgs e) { //Declarações RadioButtonList vrblAprovado = sender as RadioButtonList; try {…
-
1
votes2
answers76
viewsSave data to a text file to read later
I wonder how I saved some data as example, in case numbers, in a text file so that when I close the application the data will still be saved and when I open them I can resume them.
-
1
votes0
answers467
viewsC# Desktop System Integration with ASP . NET WEB System
I have a C# Desktop System and the data is recorded in Sqlserver. How can I write this data simultaneously to a WEB system developed in ASP . NET ?
-
1
votes2
answers640
viewsHow to return all records from a table
In my context I have a File table, and another version of the file, so I did with Entity to return a file, and only one version of the file: internal Arquivo GetArquivo(string termo) { using (var…
-
1
votes1
answer927
viewsBrowser window control with Selenium
I am automating an operation on a particular site and at a given time I need to make a download, I can authorize the download by clicking on the link but after that I lose control because it opens a…
-
1
votes1
answer233
viewsHow to login to a website through a webforms application?
I need to log in automatically to my application webforms and other application, and I would like to know how best to do this. Some options I searched for were the Httpwebrequest class, Selenium…
-
1
votes1
answer44
viewsWindows App Certification Kit 10.0 does not work
I’m having a problem sending my Windows 10 app to the store. The tool that runs after giving the app deploy, gets stuck on "cut after Direct3d suspension" and "UTF 8 file encoding", someone has gone…
-
1
votes1
answer30
viewsHow to treat Swipe horizontal, Windows Phone Silverlight?
First of all, I’m sorry about the post. Well, I’m trying to deploy a hamburger menu in my application Silverlight, I’ve tried Drawer layout, but Visual Studio insists on not recognizing it. So I try…
-
1
votes1
answer416
viewsInjection of MVC dependency
Galera I’m using dependency injection to use the Mock. I wonder if I need to create an interface for my Model and one for my Controller? Thank you
-
1
votes1
answer49
viewsNo automatic component alignments in Visual Studio
You know when you drag, for example, a textbox to one location and another to another location, and Visual Studio ends up automatically aligning for you, so that the form get more organized? I use…
-
1
votes3
answers228
viewsDifficulty to popular the Gridview
I have a screen that I consult clients and fill a grid with the information coming from the bank, my project is separated by layers until where I am works, but I can not fill the grid with some…
-
1
votes1
answer68
viewsConfiguration table
How could I use a configuration table in nhibernate? That is, a table of only one record and that it only controlled this record, I know you have how to do this via application, but I wanted to know…
-
1
votes1
answer225
viewsUse Itemcommand in C# of a listview
I’m working with a ListView in which it presents the items in a disorderly list and as links. Under the ListView has the "CREATE" button to insert a new item into ListView. I managed to get that…
-
1
votes1
answer269
viewsGet last login of the user
In my project I came up with this business rule. I need to pick up the last time the user logged in to the system. So it would be something so that I could catch the day and time of the last login.…
-
1
votes2
answers297
viewsDelete a data list in the EF
I have a method that deletes a version of a file according to the version of the file passed, 1 file may have many versions, and I wanted to delete all versions, I managed to delete only 1 version…
-
1
votes1
answer423
viewsHow to verify that all elements of a list satisfy the same condition using a lambda expression?
I have a class that represents an entity in the database. This class runs a Procedure that returns its data. I created a list of the type and this list is loaded. Let’s assume that this is the list…
-
1
votes1
answer752
viewsHow to trace routes in a C# Windows Forms application from latitude and longitude
Hello, I would like to know how to best display a route from the latitude and longitude that are in the database in a C# Windows Forms application. I’ve searched the web and I’ve managed to find…
-
1
votes0
answers82
viewsHow to create a Cellvaluechanged event in Gridview ASP.NET
I have a dynamic GRID, which after loading allows the user to modify it, changing the values of the columns by dragging the objects (DIV) between them. In Winforms, Datagridview has an event called…
-
1
votes1
answer2287
viewsConsume DLL C on VB6 or C#
I have a DLL (gbasmsb_library.dll) provided by Farmácia Popular responsible for returning some functions for interaction with this environment. I think it is a DLL written in C, I need to consume…
-
1
votes1
answer872
viewsHow do you popular a Treeview with a bank list?
I have a TreeView static representing folders and files in this template: <asp:TreeView ID="TreeView1" runat="server"> <Nodes> <asp:TreeNode Text="Diretorio1" Target="_blank">…
-
1
votes1
answer1642
viewsHow to return to View items checked by Checkbox?
I am developing a project in ASP.net MVC. In my registration form, I have a checkbox where I select the items I would like to add in the BD. My edit form, I have to get these checked items and show…
-
1
votes1
answer301
viewsPostback checkbox Asp.net with Switchery plugin
I’m putting together a list of records in a table with Asp.net. I create a checkbox for each line to perform a postback action every time the checkbox is checked or unchecked. I use the Switchery…
-
1
votes1
answer67
viewsError converting with Duocode using Winforms
I developed a C# application using Windows Forms, but wanted to convert to Javascript using Duocode. But it is giving the following errors: tryduocode.cs(7,14,7,21): error CS0234: The type or…
-
1
votes2
answers151
views -
1
votes1
answer116
viewsWorking with Regular Expression
I would like to know what is the best way to work with regular expression, so that it becomes a code reader: Example: using System.Text.RegularExpression; void LoadRegex(string filter, RichTextBox…
-
1
votes1
answer75
views -
1
votes1
answer1470
viewsPick a string from a textbox when pressing the Enter key
Is it possible to pick a string from a textbox when pressing the enter key? If so, how? I’d like you to leave examples of code because I’m pretty new to this world of Winforms...
-
1
votes4
answers2129
viewsSQL query with ID from a combobox - C#
I’m putting together a little system where I created a Formulario where there is a Combobox listing the names of the employees stored at the bank and a DataGrid that shows the services done by them…
-
1
votes1
answer188
viewsLog in to AD
Good evening, everyone, I need to login to AD using C#, I heard about a class called Principalcontext, you know how I use it? I saw that I have to go through Domain, would not work like the…