Questions tagged as '.net'

2
answers

How to Lambda in Extension Methods with multiple Lists?

There are the following Objects: public class Objeto1 { public List<Objeto2> PropObj1 {get; set;} } public class Objeto2 { public List<Objeto3> PropObj2 {get; set;} } public class Objeto3 { public int PropObj3 {get; set;...
asked by 10.08.2015 / 22:55
1
answer

What is the difference between Action, Predicate and Func

What's the difference between Action , Predicate and Func in C #? I would like examples of use if possible.     
asked by 01.10.2015 / 15:22
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
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
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
2
answers

How do I search for the default printer and print plain text on a dot matrix printer in .Net?

We have a thermal printer that does not support graphics printing - in this case, I'll have to send simple texts for it. Considering that our application will run on several different computers, each of them connected to a different printer a...
asked by 17.12.2013 / 15:02