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
answers23
viewsIconbutton Fontawesome.Sharp Error
I’m using an extension, Fontawesome.Sharp in my Winforms project. I never had problems using Iconbutton with font icons but in this project, when I run, sometimes the icons I set in the button…
-
0
votes0
answers29
viewsHow to insert a Datarow in the middle of a Datatable
I need to give an Insertat of a Datarow in the middle of a Datatable, but the way I’m always making the error "This line already belongs to another table" DataTable subpedido =…
-
0
votes1
answer115
viewsImage file encryption with c#
Hello. I receive an array of bytes containing the image. I need to record this image in an encrypted file and not the encrypted content and save it to directory. How to do this directly without…
-
0
votes1
answer51
viewsHow to make a condition that checks the variable type of a var
I was trying to do a basic program to make the rule of three, but I came across a problem, the user should write at the command prompt the two fractions and so I would give them a value var to…
-
0
votes0
answers112
viewsWebrequest connection
I have a website ready, but I want my program to check the user login on the site. Basically it can register in both and access both with the same user(The site and the system uses the same…
-
0
votes1
answer52
viewsC# Applications. Net MVC how to share login
Hello, How to integrate applications developed with C# . NET MVC, with a single login? Save the proportions, what I look for is something like what happens when accessing gmail, then turn on…
-
0
votes0
answers74
viewsFolder Reset does not appear the folders of my code (Visual Studio)
All these folders are inside my visual studio, I’m trying to move to github but at the time I access "Source > Repos" they don’t exist there what I can do to solve?…
-
0
votes0
answers112
viewsHow to insert Connection String in a console project in . NET CORE 3.1
appsettings.json in . NET CORE 3.1 no longer exists, has been integrated into . csproj. I would like to know how to configure my Connection string, the console project in . net core 3.1 is created…
-
0
votes2
answers1946
viewsHow to release memory after performing a certain task?
In a certain task, I have to upload 6 photos in 6 PictureBox, for this I use the method below: private void simpleButton1_Click(object sender, EventArgs e) // botao carregar foto { OpenFileDialog…
-
0
votes1
answer24
viewsDecimal value formatting . NET Framework
Considering the code below, how can I change the return of .7777 for 0.7777? using System; using System.Globalization; namespace Teste { class Program { static void Main(string[] args) { decimal x =…
-
0
votes0
answers18
viewsC# - How to make the program run something in certain days after execution?
I have a project that to start the . exe requests the registration of a company, but, need to renew the license in order to continue using, in case, how do I perform some action asking the customer…
-
0
votes0
answers41
viewsHow to use Notifyicon in C# Form
Can someone explain to me how the Notifyicon ?
c#asked 3 years, 12 months ago Antnio Caetano Rocha 1 -
0
votes1
answer19
viewsI would like to send data from a txt(read) file to a listbox
For example: File reading string [] linhas = File.ReadAllLines("ip.txt"); Console.ReadLine(); I did the file reading, now I want to throw them in a ListBox, how to do?…
-
0
votes0
answers31
viewsError creating tables - ASPNET-CORE-C#
Good afternoon to you all. I am studying C# with Asp Net Core and I am having problems in a matter of a job. I need to create several tables (consultation, doctor, patient...) within the…
-
0
votes1
answer56
viewsView data on a C# ASP.NET search screen
Bring information to the View() Everybody, good afternoon. I have the following difficulty: I have a search screen of a Helpdesk and I need to display the database data, which is a list of calls,…
-
0
votes1
answer24
viewsAzure Webapp VS Azure Function
What are the biggest differences between webapp and Function? At first, I know that webapp supports higher amounts of data than funtion, and that Function has other forms of activation like Queue,…
-
0
votes0
answers25
viewsHow to take data from a table and pass in a View
I did this Action and I need to send to a View when creating an internment need to put which patient intern.…
-
0
votes3
answers360
viewsReturn View using View Data ASP . NET MVC
I am a beginner in ASP Net and I am in the "studies" phase, I wanted to know why my code is giving attributes errors. I am using a POST method to send the attributes to a VIEW. Here is a picture of…
-
0
votes1
answer22
viewsCompare id in two tables and return sql promo value
Hello! In my product table and in the promotion table are idcategory, I have my product with a certain category and when I find the same idcategory in the promotion table and this is with active…
-
0
votes0
answers28
viewsDebug webhook (.net core) method
How can I debug the code of a method intended to receive an event through webhook? The communication is taking place without problem, because through the application ngrok, I can identify the…
-
0
votes1
answer210
viewsASP.NET Web API post Byte[]
I’m creating a Web API and my model has a property byte[], but every time I try to make a Post my model arrives null, taking away the property byte[] he usually arrives the model. [Table("Pessoas")]…
-
0
votes1
answer91
viewsFile . suo appears changed in the repository, but I have not modified anything
always appears this modification when opening vsCode…
-
0
votes1
answer25
viewsDisable automatic web api c#
Hello, I’m developing an Api in c#. There is a documentation that it generates automatically as per image below, only when I go up the API in production I would like to disable this documentation,…
-
0
votes1
answer61
viewshow to import a file. ofx in VFP
I need to import a valid OFX THAT IS AN SGML file for a cursor, so I searched how it is not the same structure as an XML it is not possible to import using the same method as an xml (which is…
-
0
votes1
answer193
viewsNhibernate Self-reference Mapping
Hello, I need to return a list of child objects of the same kind as the father. however, using nhibernate, it only returns one child object, while in the bank I have 3 children. Below are excerpts…
-
0
votes0
answers53
viewsSend text to a textbox using another Winform C#
I am developing a system, and in this system I need to pass the client name to a text box that is in another form, that is to say I needed the TxtCliente was public, so that then I could go in the…
-
0
votes1
answer79
viewsCapture Stackoverflowexception
I have a problem with Stackoverflowexception in an application ASP.NET MVC and I can’t find what might be causing it. I installed the Elmah as suggested in another topic on the same problem, but it…
-
0
votes1
answer30
viewsRegex Data Annotation no dotnet core
to consuming an external api and one of the properties has hyphen: position-number. How can I put a note so that I can receive this amount? I am trying this way: [Regularexpression(@" [a-za-Z''-'…
-
0
votes1
answer43
viewsIs it possible to call members of a Dynamic class as a string?
using System; public class Program { public static void Main() { dynamic stud = new Student(); Console.WriteLine(stud.Name); } } public class Student { public string Name = "John"; } Output John Is…
-
0
votes0
answers231
viewsGenerate Boleto with Boletonetcore - C#
Friends, I’m trying to generate boleto with the Boletonetcore I’m trying to run the test Bancoitaucarteira109tests.cs. I created a project, inserted the files, but I’m not sure how to run it. I…
-
0
votes2
answers38
viewsHow and Where to Learn Sockets in C#
I am studying C# and decided to learn a little about Sockets and Connections, however, I’m still having doubts about how to study Sockets and where to find content about it, you have books or…
-
0
votes1
answer245
viewsError while generating file
I have a method that generates a file that method is generating the file in fact, There I have another method within my service that returns the file to the download and to that return a List until…
-
0
votes0
answers18
viewsHow to start a windows form application with operating system?
Hello, how do I get my windows form application to launch along with windows?
-
0
votes1
answer48
viewsDoes anyone know how to convert int variable to bool?
The L variables would be sides of a triangle, I put them as int and I’m trying to convert to bool, I saw some people saying that this is not possible, so what kind of variable will I use and what…
-
0
votes1
answer52
viewsQueuing Problems for Asynchronous Controllers
Hello, I’m having some problems regarding the Asynchronous Controllers, because the queuing of requisitions server keeps being locked to the client during some operation. The routines work exactly,…
-
0
votes0
answers292
viewsHow to add boot to a panel?
I need to add a button to my flowLayoutPanel when clicked on the add button ( btnAdd ). My Panel is called mainPanel NOTE : I managed to add, but I need to add the size of the other buttons. CODE…
-
0
votes1
answer44
viewsQuestion about contexMenuStrip
The thing is, I need to add these tools, exactly as shown in the image. I just need a little push on how to get started. Insert text Insert Image Delete (button) CODE namespace frmLoginRPG { public…
-
0
votes1
answer20
viewsDisable function in Datagridview
I’m trying to disable the user option click on the Row header so that it doesn’t change the order of the data in the table but I’m not getting... By clicking the header of each column it rearranges…
c#asked 3 years, 9 months ago Caio Cesar 51 -
0
votes0
answers21
views.NET Core 3.1 and Restful Api Validation
I’m using .NET 3.1 for console and I am validating a API REST, would like to know how I can validate if such API has at most 2 paths to GET as an example: /veiculos, /veiculos/{id}. I wonder how I…
c#asked 3 years, 9 months ago user220730 -
0
votes0
answers20
viewsConnect Points on Chart 'Bubble'
I’m making a graph using the Chart Bubble... but he has no default line linking the Points between themselves... would there be any way to make that call? And taking advantage... how could I leave…
-
0
votes1
answer2159
viewsPick 2-column value in Gridview to perform calculation
I am developing a simple Input/Output system of users in an environment and I have a Grid with some data and among them 2 fields of type Datetime, being them Input and Output. I need to take the…
-
0
votes2
answers27
viewsc# Webbrowser How to call the onclick function?
How to call the function onclick of this html: <a href="javascript:;" onclick="ExecutarLance('46368');" title="ExecutarLance" class="btn btn-custom3"> LANCE </a> == $0…
-
0
votes1
answer51
viewsMaskedtextbox how to put mask dynamically in Windows Forms C#
How do I hide the mask and only show it as the user fills the field (dynamically)? E.g.: In a xx/xx/xxxx date the bar appears only when it arrived at it. In the events of the component I only found…
-
0
votes1
answer30
viewsApplication . NET online + Offline
Is the following, there is today some form or tool that allows to record the data in an offline database in case the client’s internet falls? I will explain better, my application is Web, made in .…
-
0
votes1
answer27
viewsSearch for several API ids. net core
I do not know whether I was clear in the name however I have a doubt, I possess a route as follows: /api/produto/v1/Aplicacao/filter where this endpoint is a GET that passes a word as parameter and…
-
0
votes2
answers42
viewscombobox C#, Selectedtext vs Selecteditem.Tostring()
What’s the difference between the two? Can values be different if an error occurs because of this? Which takes up more memory? Apparently the two return the same value, but I would like to remove…
-
0
votes1
answer193
viewsScrollleft Javascript
I set the system, for when the screen is smaller, format the grid, to have horizontal scroll bar, is working perfectly. But beyond the scroll bar, I wanted a button or a link so that when the user…
-
0
votes1
answer108
viewsAdd javascript to webforms page
I have a method page to insert a javascript in a page. public void ControleEtiquetaDermaClub(bool visualiza) { if (visualiza == true) { String jscript = ""; jscript = " $(document).ready(function()…
-
0
votes0
answers32
viewsHow to create a generic method for reading xlsx
I would like to create a method that reads an xlsx file with different data and save according to the given object. Type: Public Reader Object (object Object, file xlsx) { //Implementation } I have…
-
0
votes0
answers37
viewsWhat are the attributes for and how do I use them?
I have the following attribute: class Program { [test] static void Main(string[] args) { } } class test:Attribute { } What can be implemented in the test class and what this implies in the main…