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
votes3
answers2989
viewsProblem when initiating visual studio solution
I want to open this solution but I can’t, someone could help me solve this mistake?…
-
0
votes1
answer587
viewsCalculate Values of a list
I have a problem which is this: I have a list which stores the products of a supposed lease in a variable and includes in a table called ItensReserva. I need to sum up the values of these items to…
c#asked 8 years ago Weverton John 1 -
0
votes0
answers52
viewsC#, sqlsever Popualar datagrid through Search
Personal I am having a difficulty, to make a call in my previous parameter is to type the name of the staff and bring the record in the grid. I’m using 3 layers, DAL, DTO, BLL; Can you guide me? How…
-
0
votes1
answer188
viewsHow to set "Check" in columns with Repositoryitemcheckedit
I have a DataGrid that some columns are CheckBox, I’m using the method RepositoryItemCheckEdit from Devexpress to do this: However, how do I make a Check? I know I need to use the property…
-
0
votes3
answers44
viewsInsert text from text boxes and read only after |
Hi, I was wondering how can I do so that the 2 textboxs inserts the ID this way in txt: txt file.: id|192919 <---- textbox1 id2|29b9a92 <---- textbox2 And then when you open the program again…
-
0
votes1
answer43
viewsHow to insert string c# in Cefsharp script
How can I insert a string c# in the script? string teste = "testando"; chromeBrowser.ExecuteScriptAsync("$(document).ready(function() {alert({0})}); ", teste); I tried this code but did not return…
-
0
votes0
answers110
viewsHow to remove 'Security' SOAP header
I am trying to consume a SOAP 1.2 web service using a WCF client. The problem is, whenever I make a request an exception MessageSecurityException occurs with the following internal message: SOAP…
-
0
votes1
answer86
viewsHow to give Reload in a Webviewer per time interval in Xamarin Android?
I’m creating an app, where it has a Webview that needs to be updated every 5 seconds while the Switch is checked, and when you uncheck it, it should stop loading the page. I tried to use a while,…
-
0
votes1
answer26
viewsGchandler.Cs Error Visual Studio 2017
Good morning, I am debugging my project and while running it I come across the following error: Someone has already dealt with this problem and can help me solve it?…
-
0
votes1
answer47
viewsattribute passing empty in Entity
I am trying to do an update only that the fields of Issue Date and Due Date do not have the slightest idea why, is passing null when I call the save changes button. Inside the controller comes a…
-
0
votes0
answers376
viewsEFD-Reinf Sending Problem (SPED)
I have a problem sending the EFD-Reinf, when I try to transmit I have the return of the webservice of the following message: The underlying connection was closed: Unexpected error in an upload.…
-
0
votes1
answer161
viewsHow to view data from various tables in Datagridview?
I’m trying to display several tables on DataGridView, from a database that is Entity Framework. Example, person table, address. I tried to use pessoa.BindingSource, then comes the address list, but…
-
0
votes1
answer1507
viewsUndefined object reference for an instance of a Visual Studio object
I have a problem with the id variable of my dataGridView, it is giving the following error: "Object reference not defined for an instance of a Visual Studio object". I am using Windows Form, Mysql…
-
0
votes1
answer231
viewsComparing Dates in string, using Sqlite and Nhibernate
I am using Sqlite and Nhibernate, and I am saving in my bank the Datas as String in Sqlite, as it is not possible to store dates in it. Everything was going ok, but I needed to compare dates to…
-
0
votes1
answer454
viewsExport List to Excel
I have a list and would like to export to Excel, in this code this bringing the records correctly, just do not export the file. I need to add something else or I’d have another way? CorpDAO dao =…
-
0
votes1
answer94
viewsFetch content from an online file
string nome, idade, valores; WebClient WEBC = new WebClient(); public void Exemplo() { valores = WEBC.DownloadString("https://pastebin.com/raw/r4GjhKQ3"); } I want to take the values of the name and…
-
0
votes1
answer137
views.Include() does not carry child class - Lazyloading C#
I was using the DDD Model with Repositories and with 3 layers of data, (Serviço,Repositorio and Dominio), with the help of some users here I decided to change the project and now I ended up removing…
-
0
votes2
answers110
viewstransform sql with subquery into query in Entity
I’m in need and I’m having trouble getting this sql with subquery and doing the same thing in c# Entity. SELECT Id,Nome, (SELECT Count(Id) FROM Pedidos WHERE Pedidos.ColaboradorId = Colaborador.Id)…
-
0
votes1
answer249
viewsError while trying to create a Controller or Apicontroller
I created an empty Asp.Net Core 2.0 project (no scaffold). DDD model and etc. However when I try to create my controller, whether inherited from Apicontroller or Controller, it gives error:…
-
0
votes1
answer398
viewsRead xml in VB.net
I’d like to read the line tag version="1.0.1.0" and store in a variable in Vb.Net? <?xml version="1.0" encoding="utf-8"?> <Feed> <Tasks> <FileUpdateTask hotswap="false"…
-
0
votes1
answer88
viewsModify generic method to merge information into classes
I’m a first-time sailor with the Entityframework and I’m working with a class USUARIO who inherits from PESSOA. There are other classes like PESSOATIPO, PESSOAFISICA, PESSOAJURIDICA, etc., the…
-
0
votes1
answer79
viewsHow to use an unmanaged DLL in the Microsoft Bot Framework?
I want to make a bot for facebook using Microsoft’s Bot Framework (C#) and also use a tool called Chatscript, which is written in C++. I turned chatscript into a DLL and called it in a console…
-
0
votes1
answer37
viewsAdd Class Dropdownlistfor
How do I enter @class = "form-control" in the code below? <div class="form-group"> <label for="disabledSelect" class="control-label col-md-2">Status:</label> <div…
-
0
votes0
answers40
viewsProcedure does not perform
I have two calls from a trial that just won’t run. The code passes, Procedure code in sql management studio works perfectly and within c# returns me no error. It registers the protocol normally…
c#asked 6 years, 5 months ago gabrielfalieri 1,231 -
0
votes2
answers453
viewsIncrement variable while holding a button
I need to do an action inside a Button, when the person presses and holds with the left hand side of the mouse on the Button, increment a variable until release. Let go, to action. Within the method…
-
0
votes1
answer111
viewsMysql Connector sending null value
I have the following code: MySqlConnection mysql = new MySqlConnection(CONEXAO); mysql.Open(); try { MySqlCommand dbcmd = mysql.CreateCommand(); dbcmd.CommandText = "INSERT INTO robos…
-
0
votes0
answers209
viewsCall c# function from within a c++ dll
Situation: I have a 3-layer project: One for data, one for C# and one for C++. The c++ layer is made using support for clr (Common Language Runtime Support (/clr)). But I use it as wrapper between…
-
0
votes1
answer27
viewserror in running c#Asp.net Entity application
Good morning, My project started from nothing to present this mistake. Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of…
-
0
votes1
answer164
viewsXamarin.Android App with Bing Maps
I saw that the Bing Map API does not provide an SDK for Android. How I could create an app Xamarin.Android with Bing Maps?
-
0
votes1
answer44
viewsProblem in the XAML Textbox for XAML.Cs
I have a XAML (Cadastro.xaml) where I did one TextBox and a PasswordBox and named them as txtCpf and txtSenha, until then without any problem. When I’m gonna use them on Cadastro.xaml.cs, I can not…
-
0
votes1
answer68
viewsHow do I get information from the drives by c#?
Good afternoon, I was asked to carry out a project that can fetch information from drives (C:, D:, etc), such as how many drives there are, the name of each one, the total space and the used. But I…
-
0
votes4
answers3163
viewsHow to get the computer name?
How can I get the "computer name" and "Full computer name" using C#? Which are shown in the computer properties:…
c#asked 6 years, 5 months ago user117214 -
0
votes0
answers46
viewsError while trying to create a view from a controller and model
When trying to create a View from the Controller, using Asp.Net Core 2.0 Web Api, I have this error. It only happens when I do: 1) Template -> List 2) Model class -> when I search the Model…
-
0
votes1
answer63
viewsDatagrid - Last column enlarges too much
I have a datagrid displaying data from a Mysql database table. If all columns are Width="Auto", when I resize the window the grid does not follow. If I put in the last column Width="*", it works as…
-
0
votes2
answers112
viewsHow to add a built-in view to an Asp.net core 2.0 controller
I created a view (Razor Page) in an Asp.Net Core 2.0 project. How I build it from scratch and I now need to assign a controller to it. How do I do it?
-
0
votes3
answers282
viewsHow can I do "Inner Join"
Preiso inner join with 2 database tables, let’s say one is called equipment and another indicator type.
-
0
votes0
answers138
viewsSpecified cast is not Valid
I’m developing a C#academic registration app. I have some composers of objects like: public class Turma { public String Descricao { get; set; } public int QtdAlunos { get; set; } public Turno turno…
c#asked 8 years ago Miro Eduardo 1 -
0
votes2
answers128
viewsHow to optimize the performance of my application when doing Httpclient resquisitions
I’m developing an app using Xamarin.Forms, but I have a problem. Settings like color, company name, cover image and soon comes through a request for a call to web service whose return is a JSON, but…
-
0
votes0
answers41
viewsDataset query showing last created ID giving error
I’m making a people registration form which when I finish entering the data it shows a MessageBox telling which ID the person was registered with. For that I use a query of my dataset(I’m using…
-
0
votes2
answers150
viewsIs it possible to apply to different computers simultaneously performing CRUD?
I am creating an application in C# using Visualstudio 2015 Enterprise together with SQL Server 2016 to save the data, but I’m almost done with the project and I still don’t know if it will actually…
-
0
votes1
answer186
viewsHow do I save an image to the database through an application?
I have an application in c# and I want to make it possible to save a photo in the SQL database. 1- How do I mount the database structure to receive an image? 2- How to send the application photo to…
-
0
votes1
answer524
viewsSimple C# MYSQL connection problem
Speak guys I’m with the following error when trying to make a simple Insert of an activity in my mysql database "System.Argumentexception: 'The boot chain format does not conform to the…
-
0
votes1
answer565
viewsWorking with view in context in Entity Framework 6
It’s all right, guys? I have a certain problem I’d like you to help me. Good I have a simple application with 4 related tables I am using Entity framework 6, my problem is in the USUARIOS class,…
-
0
votes1
answer1256
viewsHow to format`Datetime? ` in dd/mm/yyyy format using Linq?
I have the query below, but while trying to format the field Data_nascimento and Data_exclusao with the .ToString("dd/MM/yyyy") returns me to an error at runtime. The 'System.String…
-
0
votes2
answers100
viewsHow to recover address ID?
I’m using Asp.mvc. On my route has the ID, the page address for example has http://user/1 . I wanted to get this number 1 at the bottom of the page, there’s some way to do it?…
-
0
votes1
answer266
viewsBematech MP 4200 TH - dll MP2032 to know if you finished printing
Good afternoon, I am developing an integration with payment via Getnet TEF in c#, my problem is in printing the payment confirmation coupon, and for approval I need to be sure whether the printing…
-
0
votes1
answer158
viewsHow to arm selected checkbox in an array in c#
Hello, I’m new in development in c# and have in my form an option for fruit selection Grape[] Pera[x] Apple[] Banana[x] How I could store in an array only the selected checkbox?
-
0
votes2
answers101
viewsHow to create events in C#?
I have two classes one that has a list and I would like to have an event that every time that list was changed that event was called. public class Exemplo { List<string> lista = new…
-
0
votes1
answer132
viewsDesktop app changes - Visual Studio C#
I am starting to create desktop applications in Visual Studio C# and came to me the following question, after generating an application executable and install on another computer is it possible to…
-
0
votes0
answers591
viewsSynchronize sqlite with an online database
I need to synchronize (one throwing information to the other) a DB sqlite with some DB server like sqlserver or mysql, and I would like to know how I can do this, I am using the language C# with…