Questions tagged as 'c#'

1
answer

Scroll bar on a table with bootstrap

I have a table, where I load information from the database into it. It has two columns (CNPJ and Social Reason). The table I mounted with bootstrap. I would like it to have a maximum height and create scrollbar (I find that difficult), as I do n...
asked by 27.06.2014 / 15:01
2
answers

How to get all records of a mixed table generated by class inheritance when using EntityFramework 6?

I have a class structure in the following form: public class Pessoa { public int Id {get; set;} public string Nome {get; set;} } public class Membro : Pessoa { public int CargoId {get; set;} public Cargo Cargo {get; set;} } p...
asked by 21.04.2014 / 17:12
1
answer

3 layers vs MVC

3 layers: DAL (Where is the model and operations with the bank BLL (Where is the business rule) Presentation (Usually the WEB) An example: DAL public class AlunoBanco { public void InserirAluno(Aluno aluno){ ......
asked by 22.09.2014 / 01:41
1
answer

Convert int or string to enum

How to convert variables from types int and string to enum ?     
asked by 13.11.2015 / 14:52
2
answers

What is the IL code and where can I find this code?

In my question about static constructors user bigown showed how the code generated from a static constructor is by .NET, this code is called IL Code according to its response . See the IL code of my question: .class private auto ansi '...
asked by 04.07.2016 / 02:09
2
answers

How do properties work in C #?

In Java, I usually create private attributes and create getters and setters methods because of encapsulation. I could not understand right how this works in C# .     
asked by 05.10.2016 / 14:44
2
answers

Daylight Saving Time with Old Dates

On my system saved all dates in UTC , but in the display for the user I show in GMT -3 . The problem is when I save a date in daylight saving time, because in case it will not be made the difference of 3 hours, it saves doing the conversion...
asked by 13.09.2017 / 20:45
1
answer

Is it possible to create a website with HTML and C # without ASP.NET?

Is it possible to create a site only with HTML and C # without ASP.NET? In general terms, how?     
asked by 20.09.2017 / 14:34
1
answer

Why should a struct be at most 16 bytes?

I saw in a question about classes and structures that the latter should have a maximum of 16 bytes. Why do you have this limitation?     
asked by 08.05.2017 / 13:27
1
answer

How to get the type of the generic entity of the upper interface?

I have the following situation: public class MinhaClasse : IMinhaClasse<Carro> { //... } public static void Main(string[] args) { var foo = new MinhaClasse(); } Is it possible to get the generic parameter type of IMinhaClasse...
asked by 17.03.2014 / 19:52