Questions tagged as 'c#'

2
answers

Create key in windows registry without permission in C #

My application needs to insert itself into Windows Defender exclusions. Just create a MYapp.exe key on the path {HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Processes} , but it is returning the message stating that I...
asked by 06.06.2017 / 20:40
1
answer

Page shows only the files in IIS 7 MVC 5 Application

I have an Mvc 5 application, for development I used IIS Express, everything works normally on it, but I'm having a problem uploading it to IIS 7. Even on my local machine, I'll later take it to Windows 2008. The problem is that running http:/...
asked by 03.06.2017 / 17:26
1
answer

How to create an asynchronous method that is cancelable?

How to create an asynchronous method that is cancelable? In this context, the DoFoo() method does things that can not be simply stopped, such as reading and writing files, and by canceling, I have to wait for these I / O operations to...
asked by 28.07.2017 / 15:41
1
answer

Navigation Properties - Domain-Driven Design

Hello, I'm studying DDD and I came across the following question: There is Aggregate , a set of related objects that have an Aggregate Root Aggregate Root / strong>). So far so good, I've created a routine that would generate all the in...
asked by 11.06.2017 / 19:29
1
answer

What is the GUID for Visual Studio projects

I have a "base" project in C # MVC (login, access control and related), to replicate in other projects, which is to copy the fonts and sometimes rename the project. Do I have to change the GUID of the assembly? What is it for? Are there any pr...
asked by 28.07.2017 / 00:45
2
answers

C # check "null" or "NaN" or "false" or "0"

I'm having a validation difficulty. I have View that sends to Controller information, where view is used knockoutjs , however it has time it sends null or "null" or "NaN" or "false" or "0...
asked by 09.08.2017 / 16:21
1
answer

MemberwiseClone of aggregates

I have in memory (not yet stored in database) an object of type List<NotaFiscal> . I need to pass an item from this list as a parameter to a screen, so that changes are made to that object. However, it may be necessary for the user t...
asked by 20.02.2017 / 19:28
1
answer

How to mark / warn that a method is obsolete

I've noticed several times in Visual Studio about obsolete methods of some components / libraries: Asforexampleleavingthemethodbelowobsolete:///<summary>//////</summary>///<paramname="a"></param> /// <exception...
asked by 22.02.2017 / 20:42
1
answer

Pass the return (integer) of a method from Controller to View

I have this method in a controller : int GetSpot() { List<CompanyDetail> topCompanies = GetTopCompanies(); CompanyDetail topCompany1 = topCompanies.Where(x => x.Company.TopCompany == 1).FirstOrDefault(); if (topCompany1 ==...
asked by 08.02.2017 / 19:28
1
answer

c # Microsoft Access converting date

I'm having problems with INSERT and UPDATE because on my machine dates are being converted automatically, but not on users' machines. Ex: OleDbCommand cmd = new OleDbCommand("UPDATE tblPendencia " + " S...
asked by 06.12.2016 / 19:57