Questions tagged as 'c#'

1
answer

Print PDF file using PrintDocument

I'm developing an application, Console Application in Visual Studio 2015, that its function is to print documents. I can print TXT and DOC without problems using class PrintDocument but I can not print PDF files. Is there any way to pr...
asked by 18.10.2016 / 19:01
1
answer

Excel file reading with more than 1 worksheet in the same file using C #

In this code I can read all data from the Plan1 worksheet that has the name "Data" from the ".xls" file, but if I have more worksheet in the same file, how can I read it? Coderead:staticList<Entidade>ObterDadosExcel(stringcaminhoArquivo...
asked by 28.08.2018 / 04:11
1
answer

Size of a very large Xamarin Forms application

I recently created an application using Xamarin.Forms, but after launching, it was 15MB in size. My application has a total of 8 pages ( views ) of which only two use images and speaking in images the total size of my resoucers folder is no mo...
asked by 22.08.2018 / 18:03
1
answer

Refactor SonarQube code

What could I do to improve this code? SonarQube indicates that I should refactor this code, but it does not have any suggestions: var dados = Set.Where(s => s.Id > 0); if (filtro.IdSolicitacao > 0) { dados = dado...
asked by 27.08.2018 / 15:18
1
answer

How to replace bar and space by semicolons in C #

I want to create a system that removes all slash and spaces by semicolons, for example 4587 / 5458 = 4587;5458 4587 5458 = 4587;5458 How can I create this system with C #? My code so far looks like this: private void bt_validar_Click...
asked by 05.08.2018 / 04:21
1
answer

How to use C # #region in Javascript? (Visual Studio 2017)

Little use to organize my C # code: #region Nome //seu código #endregion How can I do this through javascript and Razor? @if() { //code javascript } Update: I checked the colleague's reply Cigano Morrison Mendez here and it...
asked by 13.06.2017 / 02:44
1
answer

Do a join make the search faster?

I have two tables, one for patients and one for queries. In summary, the tables have the following structure: Patients int id; string nome; string cartaoSus; Queries int id; int idPaciente; dateTime data; When I want a patient r...
asked by 05.07.2017 / 15:11
1
answer

Doubt regarding good practices with virtual properties

I have a project that contains my classes that represent my entities in my DB. So, as an example goes there: In the Endereco table, I get a FK of Bairro(IdBairro) . To best represent my POCO , what is the best or onl...
asked by 01.07.2016 / 20:02
1
answer

Mounting an HTML table from another records with JQuery and C #?

I need to compose / generate a new table in html where the new records will come from a selection of <input type checkbox> in another table in the same html page displayed in a modal, see image. Once the user clicks on import, you...
asked by 08.07.2016 / 19:48
1
answer

Nested dispose is required?

I have the following hypothetical code. using (var QDR = new DAL.teste()) { //codigos using (var QDR1 = new DAL.teste1()) { //codigos using (var QDR2 = new DAL.teste2()) { // códigos } } } Is...
asked by 27.06.2016 / 15:39