Questions tagged as 'c#'

1
answer

What is the minimum size of an object in memory?

I received an answer in my question that talks about an overhead that the object has. Every object has this overhead ? Does an object with no data also have this overhead ? Is there an object of size 0?     
asked by 27.04.2017 / 14:52
3
answers

Turn the first letter of a string in uppercase?

Example: I have a string "stack exchange" , how do I transform its first character, getting "Stack exchange" ?     
asked by 24.08.2015 / 01:33
1
answer

How Lazy Load Entity Framework works

It's the following personal, so I saw in Entity to use Lazy Load you leave the property without the virtual keyword , and eager with the virtual. However, I have seen in some blog posts that staff use the Configuration.EnableLazyLoad...
asked by 09.06.2014 / 19:36
2
answers

What is the best way to read an XLS file?

I would like to know the best way to read an XLS file in C #. Can I treat it the same way I treat a table in the database?     
asked by 12.05.2014 / 19:44
3
answers

How to convert a string to Listint

I have the following variable and would like to convert it to an integer list: string variavel = "1,2,3"; Is there a way to convert it to a list of integers?     
asked by 06.08.2015 / 14:16
4
answers

Interaction between forms?

In my program, I inserted a button and a panel . When the button is clicked, logic inserts another form in panel overlapping form initial. No form2 that appears has a return button, which causes form2 to add...
asked by 29.07.2015 / 23:06
5
answers

Error passing URL as parameter ... JoeBlogs & HtmlAgilityPack

Main namespace ReaderXML { class Program { static void Main(string[] args) { var website = LeitorDeXML("http://SITE ORIGEM/").ToArray(); var total = website.Count(); for (int i = 1; i...
asked by 20.05.2015 / 22:15
5
answers

How to separate "words" in CamelCase in C #?

How can I separate "words" into CamelCase using hyphen for example? With a string: string example = "CamelCase"; // CamelCase para: // Camel-Case and enumerator: enum Example { CamelCase } Example.CamelCase.ToString(); // CamelC...
asked by 24.02.2018 / 15:37
1
answer

How to install a Windows Service without Setup?

I have a Windows Service project in Visual Studio in C #, however, I need to install this project from lines of code, without using # Is there any way to do this?     
asked by 18.04.2014 / 15:28
2
answers

What is the purpose of a static constructor?

I've always used constructors as follows: public MinhaClasse() { //Algo ... } However, I discovered that in C # it is possible to create a static constructor as follows: public class MinhaClasse { public string Propriedade { get;...
asked by 03.07.2016 / 23:39