Questions tagged as 'c#'

1
answer

How to move files read by StreamReader in C #?

I'm trying to move some files. For each file containing the word "TEST" in your body, my application indicates that it is an item found. The goal is to move them to another directory. Here is the code below: string[] Lista = new string[] { "TE...
asked by 19.10.2014 / 02:27
1
answer

Design pattern Observer applied to events

I'm studying the design patterns and I'm trying to apply a real situation to them. And an example I made was in the event scenario: In this scenario every event has participants to register. So, I have implemented the Observer standar...
asked by 24.12.2014 / 11:07
1
answer

Error in the XML signature of NFs-e Belo Horizonte

I am developing the integration of a system to issue Nfse to Belo Horizonte are happening 2 situations that only with this prefecture that I have developed are happening, already we have integrated several prefectures and this is the one that is...
asked by 07.11.2014 / 18:05
1
answer

Generate Danfe from NFe XML [closed]

I'm developing a ASP.NET MVC application with C# and need to transform XML of NF-e to Danfe in PDF , does anyone know any component for this?     
asked by 27.01.2016 / 11:00
1
answer

Serialization of exceptions

According to the msdn documentation, an exception must be serialized if it needs to be propagated out of the assembler. In visual studio, I have a solution with some projects, among them a class library project (dll), in which I create severa...
asked by 09.02.2016 / 17:59
1
answer

Entity with multiple members of the same type in the Entity Framework

When we have two many-to-many related entities and create the navigation properties correctly, the entity creates an extra table to set up this relationship. In the case where I'm working I have a structure that in the best of worlds would lo...
asked by 18.12.2015 / 08:25
2
answers

How to join lists in C #?

I have two classes: public class Produto { public int ProCodigo { get; set; } public string ProNome { get; set; } public int DepCodigo { get; set; } public virtual Departamento Departamento { get; set; } } public class Depa...
asked by 11.11.2015 / 18:54
1
answer

Error executing test project

I added a test project in my solution to test the methods of my MVC application. I created a base class, for the other classes with tests to inherit from it, which contains the creation of the context ( IdentityDbContext ). In the c...
asked by 19.11.2015 / 14:25
1
answer

Cancel DoubleClick in TreeView

I'm using TreeView to control the permissions on my system, each operator has a profile that determines their minimum access, but it is possible to give more permissions to a particular operator, without having to create another profile e...
asked by 30.07.2015 / 19:57
1
answer

What is the correct way to use BCrypt?

I want to give a satisfactory level of security to my system. In my searches I found several functions that create hashs for passwords, but of all of them, what I saw the most recommended were PBKDF2 and BCrypt. Home In all searches however, wha...
asked by 18.09.2015 / 17:04