Questions tagged as 'c#'

2
answers

Form behind the Windows toolbar

What is happening and the following, when I configure the form in C # visual studio 2015 to maximize, the bottom of the form is behind the windows taskbar, how can I solve it? Follow the code: public class frmComissaoPic : Form { ......
asked by 27.10.2017 / 19:02
2
answers

one for many and many for an Entity Framework

I'm developing these classes in this diagram, but I'm not sure how to declare relationships [One for many, many for one] Here's the diagram: forexampleProducthasaCategory,andCategoryhasseveralProducts:publicclassProduto{[Key]publicintCodigo{...
asked by 25.10.2017 / 21:57
1
answer

How do I print an array in Windows Forms from Visual Studio?

How can I print an array in windows forms? I tried the listbox using this code: public void Mostrar_Grafo(int Qtdlinha,int Qtdcoluna, string[,] MAdjacencia) { ListBox listbox1 = new ListBox(); listbox1.Size = new System.Dr...
asked by 23.10.2017 / 05:27
1
answer

I would like to understand what OLTP is

They asked me this question: What is OLTP? I ran home, opened google and started to "goolgar", so I came across these codes, which are said to have problems in OLTP environments and I do not understand bullying: public JsonResult ListarAlocaco...
asked by 08.03.2018 / 18:32
1
answer

Is there a maximum use quantity of "using"?

My initial doubt was, if it was right to use using within using , I managed to cure it in this response: Is it correct to use a using block within another using block? But I was wondering, is there a maximum quantity? Tha...
asked by 28.03.2018 / 21:55
1
answer

Sending complex objects via HttpGet

I have a search method in my WebApi, as it is a search, I used [HttpGet] , as a parameter of this method, I pass an object with the filter options I want, for example: public class ParametrosBusca { public string nome { get; set; }...
asked by 13.07.2017 / 14:40
2
answers

IF within a class

I am new to C #, and wanted to do the following: I have the dllimport class being used in another class. The problem is this, I want to pass the constant (dll path) according to the version of windows 64 or 32. I tried to pass a method as parame...
asked by 12.09.2017 / 21:47
2
answers

How to return the name of an instance of a class?

In order not to have to manually write the data after an update on the objects, I decided to create a method of type static to be accessed by passing the object as a parameter. public static void Relatorio(Trem trem) {...
asked by 30.09.2018 / 20:22
1
answer

Difference between declaration of properties in C # [duplicate]

I'm studying C #, quite a beginner, and I came across one thing, the course I'm doing has video lessons from 2015, and it passes me to create a class with attributes and properties this way: (Tabs and blank lines are my preference to "find me"...
asked by 17.10.2018 / 15:31
1
answer

Error: escape sequence not recognized [C #]

For this code snippet in my program I get the error alert that it considers that the command has an invalid, ie unrecognized escape sequence. string.Format("/c {0}", "cd .\Debug & imagem.png"); How to proceed and make it able to recogni...
asked by 20.09.2018 / 16:31