Questions tagged as '.net'

3
answers

Difference between Console.Read (); and Console.ReadLine ();

I'm starting to learn C # and got a little confused by one thing. What is the real difference between Console.Read(); and Console.ReadLine(); ?     
asked by 16.02.2015 / 23:37
1
answer

Guid.Parse () or new Guid ()?

What is the main difference between using the options Guid.Parse() or new Guid() to convert a string into a Guid ? And which of the two approaches would be best to use? var usuarioId = new Guid(User.Identity.GetUse...
asked by 12.04.2018 / 15:03
2
answers

What is the purpose of TransactionScope blocks?

I have a code with several blocks TransactionScope and I do not quite understand its purpose. ModeloColDataContext dm = DataContextFactory.GetContext(usuario); { if (documento > 0) { using (Transaction...
asked by 31.10.2016 / 18:38
1
answer

How to allocate an immense amount of memory?

I created an OnFly encryption algorithm that encrypts bytes without having to copy them to a new copy of these same bytes. This is both for encrypting and decrypting these byte lists. As in the scheme below, the same string that enters will be t...
asked by 07.07.2017 / 20:53
1
answer

How to copy a file from the network to my computer using C #?

I have a desktop application that needs to copy media files from a server, videos and images. The server is on the same network as the terminal on which the program is installed. The problem is that this terminal will not be logged in with usern...
asked by 24.05.2016 / 21:44
1
answer

Differences between readonly Func and Method

Forgetting issues such as readability, what would be the differences between the following calls? readonly Func = (T1, T2) = > {return default (TResult); } private readonly Func<int, int, int> Soma = new Func<Func<int, int,...
asked by 29.04.2016 / 13:58
2
answers

How to use Windows Forms components in a WPF application?

Is there any way to use Windows Forms components in WPF? For example, do I need to use the control Chart or MaskedTextBox of Windows Forms, which does not exist in WPF applications, how could I use it in my WPF application? I le...
asked by 24.09.2016 / 03:47
5
answers

How to know the number of a week in each month

I'm working on ASP MVC4, and I would like to know how many weeks in a given month to generate a list with dates. For example, the user enters a week, and in that week of each month I generate a date. The user can enter the week of the month in w...
asked by 05.02.2014 / 10:59
3
answers

Unmount a USB Pen-Drive via Code

I would like to know how I can do to unmount a removable drive (Pen-Drive) via C # code.     
asked by 21.02.2014 / 17:59
1
answer

Dependency registration responsibility (IoC, DI, n-layer architecture)

I'm starting a project in WPF (.NET / C #) using an n-layer (Domain Driven Design) architecture, and to implement Dependency Injection Control and Injection (IoC / DI), I'm trying to use the Unity Framework of Microsoft. The question I have i...
asked by 12.01.2015 / 18:56