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
votes2
answers336
viewsI’m having difficulty returning my ID using nextval, to later do the Insert in my table
I’m having difficulty returning my ID using nextval, to later do the Insert in my table OleDbConnection cnx = new OleDbConnection(new AdministradorDAO().conexao); cnx.Open(); string seq = ("select…
-
0
votes1
answer210
viewsNest <ul> tag in another <ul> tag with foreach
I have this foreach, which I did with your help here at SOPT. I cost to make it work, but it worked. Only I did it with just one knot. What I’m going to need is this. I have a father knot, inside…
-
0
votes0
answers172
viewsChange context to receive database information
I took a project from a Filemanager, which uses Handler and the same uses examples listing the directories and files of the project itself, put an example listing directory that already works, but I…
-
0
votes1
answer114
viewsConvert VB6 application to C# Webforms with Entity
I have an application in VB 6 and would like to migrate it to WebForms using preference c# with entity. I wonder if there is any tool that helps me in this conversion(migration).…
-
0
votes1
answer278
viewsGrouping in foreach and view does not work
I created and set a variable to control the following. My LINQ returns 5,000 lines today. This variable, it’s there to avoid repeating the same thing, like. Let’s say Linus gives me 400 ID=1 motif.…
-
0
votes1
answer338
viewsCreate a condition within a Linq
I need to make a comparison to set the value within mine select new. I’ll try to explain it better. var tipo= from t in p select new { t.Key, t.Value, }; return Ok(tipo); I wanted to buy if t.key ==…
-
0
votes1
answer662
viewsLINQ with Left Join and Multiple Keys
My LINQ query does not give error but does not show any result. Where I made a mistake? using (var db = new MyEntities()) { var result = (from dc in db.DiarioClasse join fn in db.Faltas on new {…
-
0
votes1
answer1654
viewsHow to insert a data table into the database?
People already have my datatable filled with the values that came from a file . csv now need to insert into database without using Sqlbulkcopy...how to do ? via c# This method fills my datatable:…
-
0
votes1
answer74
viewsDoubt on how to set the type to return a list
I need to return some lists to my view. I am using Viewdata. But there is a problem, when declaring the variable, I do not know what type to put. I did it in the form below and is giving the…
-
0
votes2
answers2443
viewsWhat do I need to program in C#?
I use Delphi and I need something similar to program a code like that. What I have to get to start pro lawn in C#?…
-
0
votes0
answers36
viewsStandard for Boleani methods
Dear, which pattern should I use to name methods that return a bolean (true or false) ? For example, I have a method that checks if the invoice is overdue. Possible names I thought: Billed Invoice…
-
0
votes2
answers1001
viewsFocus on open window
I am with an application in wpf, with several buttons that open other windows outside the main system. I call them through the: .show(); Focus.(); If the user clicks multiple times the button opens…
-
0
votes0
answers181
viewsKnockoutjs and ASP.NET MVC
So I’m starting to take a look at Knockoutjs and it’s all a little dark yet, in the example I’m following, I’m having a mistake that says O objeto não oferece suporte à propriedade ou método 'join'.…
javascript c# asp.net-mvc asp.net-mvc-5 knockoutjsasked 9 years, 8 months ago Pablo Tondolo de Vargas 5,444 -
0
votes2
answers1534
viewsHow to remove blank line "Return"
I have a TextBox where the user will type. I cannot leave any blank line (Return " r") before sending to the database. In my code, it works well when you find \r\r, but not when they have \r\r\r How…
-
0
votes1
answer452
viewsRetrieving values from my form
I am trying to recover the values of a form. This is the correct way to retrieve them to pass to my DAL? <div id="myModal_Veiculos" class="modal hide fade" tabindex="-1" role="dialog"…
-
0
votes1
answer125
viewsWPF - How to create a mechanism to make the application available for testing for x days?
good morning I am creating a WCF application and would like help or direction at the following point: I need to make the app available for anyone to download and test, like a test for 30 days and…
-
0
votes1
answer117
viewsHow to use query column data as a row in datagridview?
I have a query with 3 columns that bring data from the Oracle database and I want to use one of these columns as row in datagridview. Are 3 columns name, data and contagem de nomes, and in the…
-
0
votes1
answer390
viewsMask for a datepicker field in an application
I have an application in wpf, so there are windows that have fields for date types, I put these fields with datepicker in which there is a calendar for choosing the date. So far so good, what I…
-
0
votes1
answer128
viewsDate of last publication
We are having problems with publishing. We use TFS to convert the application. However, there are two people doing the final publication (I don’t accept this). There’s how I go to Visual Studio and…
-
0
votes1
answer35
viewsCalculation of how many times I need to send a string
I have a service that updates status of controller boards.. Only he only returns me only 22 records at a time. Then I need to take the number of items I want to update and send the amount of…
c#asked 9 years, 8 months ago Rafael Spessotto 81 -
0
votes1
answer723
viewsStore list in Viewstate
I want to assemble a list of strings and save it to a viewstate, and use it later. Ex List<string> listaNomes = new List<string>(); foreach(var algo in TesteList) {…
-
0
votes1
answer347
viewsThread hanging
My system has a method that puts each event fired into one thread, save, edit, search, everything goes to one thread. backgroundWorker.DoWork += acaoProcessamento;…
-
0
votes1
answer71
viewsHow do I delete this method
I can’t call the methods: DeleteOnSubmit and also the method: DeleteObject. See below my code and how I delete it. public static void deletaRuptura(int _idmotivo) { RupturaEntities db = new…
-
0
votes2
answers273
viewsAbstract unit tests
I am having a problem using abstract classes to keep the common code of my tests, shutdown boot etc... I use a concrete class only to initialize the variables. The code inherited from the abstract…
-
0
votes2
answers90
viewsExtra information on a user login
My scenario is this:: The user will log into the system. Then a list of items will be displayed and he will choose a. Then I need the system to store the logged in user and the item he chose. I…
-
0
votes1
answer274
viewsDistribuir Crystal Report
I have an application running on C# windows Form, and I need to install the Crysal Report in the customer’s machine. have this msi Crforvs_13_0_5, but when it is run on the client machine, and says…
-
0
votes0
answers1512
viewsHow to know the number of subscribers
In c# I will develop an application to control views and subscribers of my channel... I tried to enter this code: static long Inscritos(string youtube_addr){ var wb=new WebBrowser();…
-
0
votes1
answer1248
viewsHow to retrieve content from a cookie
As I do to retrieve the content of a cookie, this cookie has the ID of the material that will be requested and the amount, I need to recover to enter in the bank. I’ve searched the Internet a lot,…
-
0
votes1
answer562
viewsDoubt with View Tipada?
I got the following: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using PostGetModel.Models; namespace PostGetModel.Controllers { public…
-
0
votes4
answers1058
viewsHow to copy a datagrid to an arraylist
I have a button and command and when I click it, I need to copy all the information from my datagrid to an Arraylist. For example: The datagrid has 4 columns and 10 rows all have information, now…
-
0
votes1
answer984
viewsUpload C# API file
I have a C#MVC application, which is a web system. And I have a C# API that receives calls from the Site. I need to send a file from the Site to the API, I did the code as follows: Sending Site Code…
-
0
votes1
answer472
views -
0
votes2
answers1321
viewsgenerate a User log in C#
Personal my college project I am doing in C# windowsform and would like to generate a logo that when a user include, delete, change in any form generates a log where I can create a log form of all…
c#asked 9 years, 8 months ago Denilson Carlos 201 -
0
votes1
answer66
viewsLinq does not return data. There is data in the table and I return by query
I tried to make a LINQ very similar to my query. This is my query. select * from PDV where tipo_PDV = 'R' and UF = 'DF' and Cidade = 'BRASILIA-DF' This is my LINQ var resultado_rede_descricao =…
-
0
votes3
answers172
viewsOperator '+' can’t be Applied to operands of types 'decimal' and 'double' - Ncalc
I’m using the Ncalc lib A simple formula such as "Abs(-1) + Cos(2)" gives the following exception: Operator '+' can’t be Applied to operands of types 'decimal' and 'double' Why? How to solve? The…
-
0
votes1
answer80
viewsApply a thumbnail
How to create any file and in it make Windows Explorer recognize a thumbnail in that file, without modifying or changing it. Example: In an archive .PNG the file is not modified and Windows Explore…
c#asked 9 years, 8 months ago FRNathan13 2,183 -
0
votes2
answers2047
viewsTraverse components of form C#
Hello I have a table coming from the database, with several rows and columns. One of these columns is stored the address of the previously saved image. Now I need to go through all Picturebox and…
-
0
votes1
answer66
viewspick up customer with certain types of purchases
I have these tables: Sales : Idvenda(int)PK, Datavenda(Datetime), Qdeitem(Decimal), Valuation(Decimal). Iditem(FK),Idcliente(FK) Item: Iditem(int)PK,Descricao(Varchar),Valoritem(Decimal)…
-
0
votes2
answers2459
viewsReportview without a dataset
I am finishing my TCC and I have a question regarding the Reports with the ReportView from Visual Studio 2013. I will explain basically how my application works. The connection to the database is…
c# sql-server visual-studio-2013 crystal-reports reportviewerasked 10 years, 1 month ago Ariel Cardoso 23 -
0
votes0
answers45
viewsSeveral Migrations in the same Bank
We use the same MS SQL database for several applications. I am aware that such action is not recommended but unfortunately it is the method that will have to be applied. Work with code first and…
-
0
votes2
answers2226
viewsWhat better way to insert an array into the database
I would like to know how to best insert an array into a database table. I could use a foreach but I would like something performative because I will work with large number of data. foreach (var item…
-
0
votes1
answer268
viewsQuestions under development of Desktop C#
I’m starting to program in c# and I’m having some doubts. I would like to know where to start, for example: I have a desktop system that I use in one company, I needed to develop another in the same…
-
0
votes1
answer1103
viewsProblems publishing an Asp.net application on IIS
I am trying to publish my application on a Windows server 2012 with IIS 8. I have taken the step by step to go to "Site -> Add Website" and fill in the coordinates, paths and etc. I have deployed…
-
0
votes1
answer87
viewsHow to define data that will be shown in gridView
I have this user class ADO, where I select to return only: Registration, Name and Accesses and return in a gridView. public List<Usuario> ObterTotalporMatricula() { var lista = new…
-
0
votes2
answers460
viewsBuild possible combinations
I have the following classes: public class Categoria { public int Id { get; set; } public string Nome { get; set; } public bool Primeiro { get; set; } } public class Opcao { public int Id { get;…
c#asked 10 years, 1 month ago Diego Zanardo 3,301 -
0
votes1
answer58
viewsVoid Checkerror Oracle x IIS
Well, due to the exhaustion of my attempts to find the error, I’m going to try to get a light here with you. I apologize now if the error is too generic and does not have the necessary information.…
-
0
votes0
answers71
viewsThe "Generateresource" task failed unexpectedly
I renamed the project name and cause several problems in the project, is giving the error below. I managed to solve all others, except this one. What can it be?…
c#asked 9 years, 7 months ago Gabriel Bernardone 563 -
0
votes1
answer49
viewsForm derailed after adding a Scrollviewer
I had a form ready in my VS, After it was ready, I realized that I would need to add a Scrollbar. Searching and saw that to solve my problem was just add a Scrollviewer. When I add, my form gets all…
-
0
votes1
answer857
viewsError sending data to View
Query to bring users. public IEnumerable PopulaTabelaUsuario() { var banco = new DbBancoContext(); var listaUsuarios = (from l in banco.USUARIOS_PROCESSO select new{ l.ID_USUARIO, l.NOME_USUARIO…
-
0
votes1
answer985
viewsHow to return data from a Webservice in XML format?
I am using an example of webservice, but it is generating me an error stating that "Response' does not exist in the context Current", someone knows what could be wrong? NOTE: Error runs at build…