Questions tagged as '.net'

2
answers

Do I need to assign null to a variable after use?

Is there a need to assign null to the object after its use? In the example below right after using the list I have a method that takes a long time to run. Do I need to assign null to the list to optimize the application? priva...
asked by 20.01.2017 / 17:35
3
answers

How to get information from a SSL certificate via C #?

How to get information (expiration date for example) from an SSL certificate via C #?     
asked by 25.03.2015 / 21:14
2
answers

How to test private methods in C #?

How to test private methods using Microsoft.VisualStudio.TestTools.UnitTesting and Moq My test class looks like this: [TestClass] public class ClasseDeTeste { private MinhaClasseComMetodosPrivados _minhaClasseComMetodosPrivados;...
asked by 05.06.2017 / 22:47
3
answers

Why is it possible to define two or more methods with the same name in the same class in C #?

I'm starting my studies in C # with ASP.NET MVC today. I'm still adapting with some things I'm not used to seeing, because I know languages like PHP, Python and JavaScript. I noticed that in a code that has already come ready, when starting a...
asked by 28.05.2016 / 19:05
5
answers

Schedule execution process in C #

I have an application that will be running 24h / day the 7days / week, that is, it will always be running. I need at a specific time, every day a method of this application is called.     
asked by 17.08.2015 / 15:40
2
answers

Convert string Base16 (Hexadecimal) to Base10 (Decimal)

I have the following string "615769EF" , which is in hex. How to convert it to base10 and that the result is the string "01633118703" ?     
asked by 16.06.2015 / 15:07
1
answer

Is the C # language recommended to be distributed online with a database?

It is very easy to get the entire code from a C # program using .NET Reflector. Would it be possible for me to put the same security in a C # program as a program made in C ++? I found this answer in Stack Overflow in English but even in...
asked by 01.02.2016 / 17:33
3
answers

Update an element of a generic list by a specific item

How do I update a specific element of a generic list by locating by ID and passing an updated object in its place, updating the name and email? class Program { static void Main(string[] args) { List<Aluno> aluno = new Lis...
asked by 16.09.2015 / 21:48
1
answer

Function to generate random alphanumeric characters

I need a C # function that generates a String of random alphabetic and numeric characters of size N .     
asked by 01.09.2015 / 21:38
2
answers

Resource in an enum

I have enum and would like to change the Description with Resource: public enum SystemArea { [Description("Gestor")] Gestor = 3, [Description("Administrador")] Administrador = 2, [Description("Professor | Prof...
asked by 27.08.2015 / 19:46