Questions tagged as 'c#'

1
answer

How to perform a Count in several columns?

I would like to make a COUNT using LINQ / LAMBDA, but I'm having difficulties. Can you help me? The idea is to reproduce the following query: SELECT Conta, Tipo, Documento, Nome, COUNT(0) AS Qtde FROM TaxaPrecificacao GROUP BY Conta...
asked by 27.09.2017 / 17:41
2
answers

Reading XML in C #

I know there's a lot of Post about how to read a XML file, but I do not find any that has XML with the same structure I have. I have the following code. private void LeituraXML() { //Criando objeto xml para abrir o arquiv...
asked by 29.08.2017 / 22:21
2
answers

How to find out if I need to rotate the image

I'm implementing some features to perform OCR on images and until now everything is going very well. The problem is; the OCR works fine if the image is in the correct rotation, if it is upside down or in a 90 ° rotation the OCR ends up picking u...
asked by 18.08.2017 / 20:18
1
answer

How to do math operations with a struct? [duplicate]

I have the following structure: public struct vetor { public float X, Y; public vetor(float X, float Y) { this.X = X; this.Y = Y; } } And this code: Vars.vetor _visao; Vars.vetor _recoil; //Os 2 possuem v...
asked by 20.08.2017 / 00:45
1
answer

Convert Char to string in C # [duplicate]

I am trying to convert a char to string to use in split (), but it is not advancing string path = HttpContext.Current.Request.Url.AbsolutePath; path = path.ToString(); string[] caminho = path.Split("/"); I get the following error Argum...
asked by 27.11.2017 / 13:23
2
answers

How to get value from a database column using C #

I have a web application that uses these 3 tables: Client: CREATE TABLE CLIENTE( ID_CLIENTE INT PRIMARY KEY, CLIENTE VARCHAR(50), ENDERECO VARCHAR(50), CIDADE VARCHAR(30), CEP VARCHAR(9), UF CHAR(2) ); Order: CREATE TABLE PEDIDO (...
asked by 02.12.2017 / 15:13
1
answer

Is there already an open DataReader associated with this command that should be closed first?

I have combobox that is receiving data from a table in my MySQL DB. So far so good. However, when I return to the initial screen, where it is, it ends up giving a problem. (There is already a% open% associated with this command that mu...
asked by 02.06.2017 / 23:16
2
answers

How do you record all validation classes with DryIoc?

How can I log all of my validation classes using DryIoc dynamically? I'm trying the following way down; using DryIoc; using FluentValidation; using System; using System.Linq; using System.Reflection; namespace TesteDryIoC.IU { class Pr...
asked by 04.07.2017 / 19:28
1
answer

Manage DataTable with lots of information

I have here a "small" problem with a DataTable . From a SQL query I'm getting a huge amount of records (> 1,000,000 ), and although the query is relatively fast, loading DataTable from Fill() is extremely slow and, in some...
asked by 31.08.2018 / 15:32
4
answers

What is the use of ASAX extensions?

Finally, I started working with C #. I'm working on a SITE-type project and I'm using Visual Studio. I came across a file where you should apparently put the global settings there, which is Global.asax . It seems to have a different...
asked by 28.06.2017 / 14:23