Questions tagged as '.net'

2
answers

What is the connection string "connectionString"?

What is the connection string anyway? In a connection string which represents data-source ? And the provider name ?     
asked by 22.04.2016 / 20:02
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

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

Encrypt Web.config

I come here with a question regarding ConnectionStrings of Web.config . Seeing that we normally report a form of authentication on ConnectionStrings for the application to access the database. By default, anyone accessing...
asked by 19.03.2015 / 15:06
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
1
answer

Why iteration of a list with anonymous object works with array but does not work with ListObject?

I tried the following iteration with C #: var objects = List<Object>{ new {Id = 2, Nome = "Wallace"}, new {Id = 4, Nome = "Cigano"} }; foreach (var user in objects) { Console.WriteLine ("Meu id é {0}"...
asked by 14.06.2016 / 20:45
1
answer

How, when and why to use "SecureString" in C #?

I once heard about the C # SecureString class and found it interesting, so I think it's interesting content that can yield good answers from more experienced professionals. Some questions to ask might be: Someone has worked with this cla...
asked by 09.11.2016 / 18:06
1
answer

How do you know if the sum of two double's will give greater than the limit of a double?

Is there any way to know if a sum between two values in the format double will exceed the limit of the variable double ? Example with integer: 2147483648 + 1. In this case it goes beyond the limit of an integer, I do not know if...
asked by 19.10.2016 / 10:40