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
votes1
answer377
viewsZoom camera with touch on Unity
I am working with this code below controlling the distance from the camera to the character, this distance is the result of linear interpolation between a minimum and maximum offset, where the…
-
0
votes0
answers65
viewsStrange text appearing on page after saving a file
I’m creating a C#text editor, but when I saved a file .html, on the page appeared this error Code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;…
-
0
votes0
answers46
viewsHow to save drawing angles c#
In my game users are supposed to draw pictures that I show, I want to save the angles of the drawings to compare with the data that I already have stored in a database and see if what the user has…
c#asked 6 years, 10 months ago Pedro Neves 1 -
0
votes1
answer2646
viewsConsume REST windows Forms
I’m trying to consume a REST JSON, I’m developing a module for a legacy system in Windows Forms, it’s not working, nothing returns. Follows the code: var client = new…
-
0
votes0
answers85
viewsDate notice in the app
I’m developing a C# application in Visual Studio. In this application there is a screen that informs the amount of events that the user has today, tomorrow and the day after tomorrow (table with…
-
0
votes0
answers34
viewsMove Assembla project to Visual Studio Team Services
The Assembly has changed prices this year and it will not be sustainable to continue with the service. Is there any way to migrate projects to Visual Studio Team Services without major…
-
0
votes1
answer48
viewsHow I take the value of a checkbox to go through parameter
I wonder how I get the status of a checkbox if it is enabled or not to pass by parameter to the controller…
-
0
votes1
answer198
viewsfill in combobox with data from other combobox
I have a table City where has the fields City, Status, Idpais, besides the tables State and Country. I’m making an application in c# where I use 3 combobox. When selecting the first combobox…
-
0
votes1
answer213
viewsHow to clean Output Window from Visual Studio?
I’m writing an application that makes use of the debug class to write to the VS Output screen. Only that I would like to clean the contents of this screen through my code, because after a while it…
-
0
votes1
answer577
viewsHow do I fill a listbox c# mysql
How do I fill a Listbox with C# and mysql and at the same time put the value of each record? until the moment I managed to configure to appear the name, but not the code of each:…
-
0
votes1
answer59
viewsHow Can I Download a Report? Issue of Beliefs
I am trying to download a report (SSRS). More specifically I want to keep it in a folder so I can print it out. Turns out in development I don’t have any problems downloading the report. But at…
-
0
votes1
answer312
viewsAssembly.Load error Could not load file or Assembly 'X' or one of its dependencies. The system cannot find the file specified
I’m making a mistake using the Assembly.Load(X);. The way is right, I think you are giving error when trying to load a dependency from Assembly. But I find it strange that in Visual Studio 2017 I…
-
0
votes1
answer255
viewsAccess Database on client machine from Web Application
Hello, good afternoon. I’m developing a system that has only one code for several databases. The system already implemented almost all, but when I started to test the connection on the client…
-
0
votes1
answer305
viewsStock Quantity Management C#
I cannot find a solution for stock and sales management. The scenario would be a stock of Auto parts, where I register the entry of a product in the stock with a certain amount. Cod - name - Qtd -…
-
0
votes1
answer121
viewsException error when authenticating login with null values - Simplemembership - ASPNET MVC
I developed a project on Asp.net mvc5 of a course I’m doing, which is accusing the following error of exception when authenticating the login menu when I enter no data in the form fields and step…
-
0
votes1
answer104
viewsHow to use C# syntax in onclick
I declared a variable in view: @{ int index = 0; } And I want to change it through a onclick: @for (var b = 0; b < cont; b++) { <li> <a onclick="@(Index = b)">Endereço @(b +…
-
0
votes2
answers608
views@font-face c# MVC Bootstrap
I have a Bootstrap template that I’m trying to apply to a project, but I have a huge difficulty importing the . eot, . svg. ttf, . Woff, . otf These files are in the directory:…
-
0
votes1
answer144
viewsHow to highlight a word using REGEX
I need to colorize a text in Richtextbox before a string For example: "Highlight: normal highlight"
-
0
votes1
answer274
viewsMargin problem when generating pdf
I am making a report, when generating the pdf, I tried to implement the margin, but continues to cut the table in the middle and continues on the other page. This is happening in the margin, even…
-
0
votes1
answer152
viewsFilesystemwatcher - How to catch the user who modified C#
I developed an application that monitors events in filesystem using the class FileSystemWatcher and would like to leave installed on the file server happens that I need to register the user who…
c#asked 6 years, 10 months ago Thiago Ceconelo 1 -
0
votes1
answer5745
viewsFailure to reference a nuget package
After installing the W10 Anniversary Update, I’ve been trying to build an open source project that I normally did before and now can’t. I get the following error in the output of Visual Studio 2015…
c# visual-studio visual-studio-2015 nuget uwpasked 8 years, 3 months ago José Camelo de Freitas 407 -
0
votes1
answer104
viewsProblem with radiobutton Asp mvc
Good evening ,I am trying popular radio button varis as the value contained in my database ,however I am not able to do. Here’s the view with the radiobutton @model GuialetoLMS.Models.GuialetoModel…
-
0
votes1
answer105
viewsInstall Restsharp in PCL projects Xamarin.Forms
How do I install Restsharp in a PCL project (Xamarin.Forms). You are giving this error when installing: Unable to install 'Restsharp 106.3.0-alpha0002' package. You are trying to install this…
-
0
votes0
answers64
viewsCreate application to communicate with SYSFAN motherboard output
Hi, I’m in need of a library idea, language, code, that you know where I can write the code to communicate with the Fan output from the motherboard. To better understand the idea, there are…
-
0
votes1
answer48
viewsTcp Server adds the client name to a lisbox
I have a server and a client, when the client connects it adds the Client ip to a server listbox, appears as if an item is added (in listbox) but does not appear ip, this is the code: using System;…
-
0
votes0
answers323
viewsC# Windows Forms - Integrated Database
I will develop a Desktop application, and this application will make access to Local Database, my question is: If I make an application that accesses SQL Server normally, when I generate the release…
-
0
votes1
answer144
viewsMVVM and Binding for different classes
If in the Viewmodel Model View pattern I have: Mainpagemodel.Cs Mainpageviewmodel.Cs Mainpage.Cs Mainpage.xaml MainPage.cs is also part of my layer View? If so, it is to her that I must delegate the…
-
0
votes1
answer1981
viewsProblem for sending SPED-REINF c#
Dear friends, I’m trying to send an xml to the SEFAZ for the SPED-REINF R-1000 code, I got help for the necessary methods here with the discussion list friends. But I am with the problem that I do…
-
0
votes1
answer161
viewsHow to create grid lists with C# in WPF?
I’m new in C#. I wonder how to create a grid list that contains images, something like what android has: Thanks in advance.…
-
0
votes0
answers256
viewsGenerate . rdl Report PDF with C# Windows Form or ASP.NET
I have a report created in Report Service and working. How do I generate a pdf of this report with C# Windows Form or even Asp.net.? Note: I have to pass some parameters to the report, such as…
-
0
votes1
answer116
viewsnew networkStream what arguments to use?
is the following I have a server tcp and a client, the client has in a part of the code the following private void SendDesktop() { BinaryFormatter bf = new BinaryFormatter(); ns = new…
-
0
votes0
answers153
viewsWrite null Datetime field in Access base (mdb)
Good afternoon to all. Please I need your help. I am trying to record/update a Datetime-like Birth field, but not always this field will be populated due to business rule sometimes it will be null.…
-
0
votes1
answer687
viewsExchange "Web Browser" Vb.net
I want to change the default browser of visual studio, I would like to use another to run some scripts that are having problems in internet explorer. I would like suggestions and examples of how to…
-
0
votes2
answers1681
viewsC# - Reference a variable from another method
I have two methods and I want to find a variable from one method to the other. It is the variable base64 who is in the function base64Decode. The code is as follows:: public class WK_UpdateAlvo :…
-
0
votes0
answers1244
viewsPrint to the Elgin i7 c#
I am developing a PDV system and I need to print coupons! I am in possession of a non fiscal printer of the i7 model Elgin. I have been for hours looking for a way to print a coupon from a Report…
-
0
votes2
answers422
viewsC# WPF - Accessing another XAML element by code
Hello, I have two screens a Window and a Page loaded inside the screen Class Window1{ //to do .. __mainFrame; // acessa normal } Class page1{ //to do __mainFrame; // sem acesso ao frame } Inside the…
-
0
votes0
answers80
viewsHow to calculate +10.5% in a product
How to calculate +10.5% in a product? My calculus is like this: private void txtMargemLucro_Leave(object sender, EventArgs e) { txtPrecoVenda.Text = (Convert.ToDecimal(txtPrecoCusto.Text) *…
-
0
votes1
answer137
viewsNuget - Entity Framework error
I’m starting with C# and I need a force. I tried to connect to the database using the entity framework. In the output of the visual studio came the following message: System.Typeloadexception: Could…
-
0
votes1
answer291
viewsConnectionstring returning null
When trying to run my project is returned me the error: System.Nullreferenceexception: 'Object reference not set to an instance of an object.' I have a bank class with the manufacturer: public bd()…
-
0
votes1
answer44
viewsError while moving directory
I have a folderBrowserDialog that when we selected the folder it would move it to a particular directory. I’m making the following mistake: Cannot create a file when that file already exists. but…
-
0
votes1
answer82
viewsView Field when Selecting Dropdownlist and save
I have the following scenario: in a form I have a field called Carga-Horaria, which is a Dropdownlist with a list of hourly loads. In this drop an option called another. When selected the option…
-
0
votes1
answer87
viewsProblems serializing object to XML
After serializing an object to XML some properties disappear. These objects were automatically generated with the add and do not have [System.xml.Serialization.Xmlignoreattribute()] but are not…
-
0
votes1
answer116
viewsXamarin.Forms.Xaml.Xamlparseexception
I am creating a Xamarin project for study, I have a Masterpage and inside it I have the code below: I am compiling for Android and I see that the problem is in this line:…
-
0
votes1
answer24
viewswanted to make a server transfer to the master page
i am trying to make a server transfer to my master page but this to give this error: No HTTP processor found for the 'POST' request type Description: Unprocessed exception when executing the current…
-
0
votes1
answer183
viewsSolver does not calculate solution for model
I have implemented a routine that makes calculation of the appropriate percentage of ingredients that is required to formulate a feed. To make this calculation I’m using the Solver Foundation of MS.…
-
0
votes1
answer83
viewsPull a return from a JS function to C#
In the user registration process I want to validate your CPF by Javascript and return if it is valid or not in beckend. And so make a if with this result to insert it into the database or not. if…
-
0
votes0
answers18
viewsDoubt in the FOR command
Good afternoon, I am a beginner in C# (it is not even 2 days since I started studying) and I would like an explanation of the line: WriteLine($"{n1:d2} x {n2:d2} = {n1 * n2:d2}"); Relating to that…
c#asked 6 years, 10 months ago Felipe Leal 1 -
0
votes1
answer23
viewsFor with Datetime in Razor giving out of memory Exception
I am having out of memory error, being it caused by this Razor code in my cshtml file, and can’t identify where the problem is. @for(DateTime data = DateTime.Today.Date; data <=…
-
0
votes1
answer613
viewsCreate a Table at runtime. C#
Hello, I need to create a table within a DB Access at runtime. The Database already exists, I would just like to click on a buttona new tablewas created within this DB with Nome de Campos and Data…
-
0
votes0
answers79
viewsRequest for time-to-time API
I am in need of making requests for a time API in time for example, every 10 seconds, I have no knowledge of any way to do this, it would be similar to SetInterval of javascript but in C#, the other…