Questions tagged as 'c#'

3
answers

BundleConfig.cs is really necessary

I'm reading something about MVC, WebAPI and AngularJS. All the examples I have taken, either from Macoratti or others ask to do some configuration in the BundleConfig.cs. However I use VS2017 and when creating the test project, in the App_Sta...
asked by 06.12.2017 / 23:57
1
answer

How to join two vectors in another that does not have repeated values?

I need to make a program that reads the values of two vectors R and S , and store its values in a third vector called V . The detail is that it can not contain any element repeated in the V vector. I was able to make...
asked by 07.09.2018 / 16:25
1
answer

Entity Framework 6: Context Management Problem

I have the Calendar object and create it as follows: public class Program { public static void Main(string[] args) { var clienteDAO = new ClienteDAO(); var treinoDAO = new TreinoDAO(); var agendaDAO = new Agenda...
asked by 16.11.2017 / 12:51
2
answers

What is the best way to handle Exceptions and Log in WebAPI (C #)? [duplicate]

Scenario: WebAPIs in .NET 4.x Objective: Improve Logging (info, error, debug, warning) and Exception Handling, for example, logging exceptions, which frameworks do Logs use? Where do they usually store Logs? I found a tool called DataD...
asked by 14.11.2017 / 16:13
1
answer

Object Selection Unity C #

Well, I'm going straight to the point, could give me a force in this script that I'm doing, it selects using buttons -1 and 1, until it works, the previous one gets bugged using System.Collections; using System.Collections.Generic; using Unity...
asked by 25.11.2017 / 05:56
1
answer

Edit value inside a node in XML with C #

I have a login system in C # and a following XML file: <?xml version="1.0"?> <Usuarios> <Usuario> <User_ID>001</User_ID> <Password>010309</Password> <Password_Change_Date...
asked by 22.11.2017 / 23:14
1
answer

How to use the C # syntax in 'onclick'

I declared a variable in view : @{ int index = 0; } And I want to change it through onclick : @for (var b = 0; b < cont; b++) { <li> <a onclick="@(Index = b)">End...
asked by 09.01.2018 / 12:44
1
answer

My _Layout.cshtml file is not being recognized in the application, what to do?

I'm doing an application in MVC asp.net, and out of nowhere my application no longer recognizes the layout file no longer applying the bootstrap and jquery ... How can I solve this ?? My layout file looks like this: <!DOCTYPE html>...
asked by 26.01.2018 / 11:04
1
answer

How to read a JSON file using C #?

I have my code that reads an external API and returns me information, I would like to read this information or add it to a class: I'm using Newtonsoft.Json; This is Json: { "success": true, "errorMessage": null,...
asked by 06.12.2017 / 13:21
2
answers

Get the name of the connected wifi in C #

Obs: Não tem muita explicação, apenas obter o nome do wifi conectado.     
asked by 01.03.2018 / 16:30