Questions tagged as '.net'

2
answers

Extract XML tags C #

I was able to get a tag, but I did not find a way to get a repeat tag and store each repetition in a list. XML Example <casa> <porta> <janela>Janela 1</janela> <janela>Janela 2</janela> &...
asked by 11.10.2018 / 13:44
1
answer

Know the size of each element of a list

Assuming I have a List<byte[]> Imagens; and I want to know if any element in this list has more than 1 mega, I could do this via foreach , checking item by item: foreach (var item in Imagens) if (item.Leng...
asked by 15.09.2018 / 17:09
2
answers

What is the best way to authenticate to the database?

What is the best way to make a connection to the database using C #? Create a USERS table, or create a USER in the database to access?     
asked by 02.11.2017 / 19:47
1
answer

Instantiate class or use public methods?

When using a method of a class, there are two approaches: instantiating the class and using the method by the object, or making the method public static and calling directly. Is there any problem in using one or the other? Security, perfo...
asked by 13.01.2017 / 13:47
2
answers

How to create unmanaged variables?

When you create a variable, a value is allocated in memory for it, which can be accessed by any system from outside the address of that memory. Creating a file to store the contents of a variable would also create a file location, which could...
asked by 08.07.2018 / 21:10
1
answer

How to tinker with code in a DLL?

The bar code is being generated through a class from a DLL downloaded from the internet. I need to change this barcode, but this class is blocked. How can I play a game?     
asked by 05.08.2015 / 22:50
2
answers

What framework should I use in Functional Testing in .NET?

I would like to know the framework options that simulates testes unitários to the .net . I know a little bit of Ruby and I know that there is Cucumber that is very good, but for .net I did a search and realized that...
asked by 18.02.2014 / 23:16
1
answer

How to get the exact value of the division with the decimals after the comma? [duplicate]

I need to do a percentage calculation, but I am not able to recover the exact value. Example: int valorUni = 8; int valorTotal = 116; double result; result = (valorUni / valorTotal) * 100; //Resultado esperado: 7,547169811320755 //Resu...
asked by 08.11.2018 / 14:08
2
answers

How to truncate decimal to X decimal places? [closed]

I'm using the following code, but when I send ex: '10 .100 'to 2 houses it returns '10 .1', but should be '10 .10 ' public decimal TruncarDecimal(decimal value, int decimalPlaces) { decimal integralValue = Math.Truncate(value);...
asked by 19.09.2017 / 16:58
1
answer

Force user to select the Radio Button inside the GroupBox

How do I force user to select a Radio Button within the GroupBox. Image example below     
asked by 05.10.2017 / 18:07