Questions tagged as 'c#'

1
answer

Doubt about Messagebox

I have a question about our famous MessageBox.Show(); , this command is about an event, method what would it be? Another question is about instantiating object, in the example below we are getting our login form and creating a variable...
asked by 29.04.2018 / 05:04
1
answer

How to add elements in Queue continuously?

Below I have a code that it needs to do the following: Create a thread, then start it. When you start the thread, according to the time (random time) the program adds a value in the queue, after being added to the queue, it needs to show how man...
asked by 01.05.2018 / 02:13
2
answers

Post Angular Method

Hello, I'm developing an application using BackEnd as ASP.NET C #, and with Front Angular5! I'm doing a post method for the first time and it's not flowing well! In the BackEnd I have a method as follows: [HttpPost, Route("api/usuario/no...
asked by 19.04.2018 / 07:19
2
answers

Problem saving data to the database

I created a simple application, but when I click on the action button responsible for saving the data, the program stops working. Here's a picture: Save button action: - private void button_Click(object sender, RoutedEventArgs e)...
asked by 14.03.2018 / 22:28
1
answer

Remove parameter name URL MVC

I have the following URL    / vlog / usertimeline /? slug = tests for the Vlog controller, action usertimeline and slug parameter. How do I set the route to be    / vlog / usertimeline / tests I'm using MVC 4. I have the followi...
asked by 22.03.2018 / 16:34
1
answer

Problem passing information from AJAX to Controller

I have the following ajax that takes the order code. At the moment I can get the order code, however, it sends null to controller var btn = document.getElementById("btnNumeroPed"); btn.onclick = function () {...
asked by 23.03.2018 / 20:09
1
answer

Authentication bearer Xamarin

I am new to xamarin and I have a question about authentication in an API, when I am consuming via C # or angularJS for example I can enter in the url the type of authentication (token that saved in a session) that I got in bearer. In Xamarin for...
asked by 26.03.2018 / 21:15
1
answer

Default value for property according to type and core

I have a code in which I define some properties according to the type of the variable in EF6 protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Properties().Where(p => p.Name == p.ReflectedType.Name +...
asked by 28.03.2018 / 14:27
1
answer

Error consuming webservice in C #

I'm doing a web service in C #, to consume its data via javascript (without being an application made in ASP.NET or any .NET technology, I want to use only html and javascript). My web service has been configured like this: [WebService(Name...
asked by 11.04.2018 / 15:18
1
answer

Map sub-property

I have three classes public class Ligacao { public string Guid { get; set; } public string Telefone { get; set; } public Status Status { get; set; } public string ArquivoJson { get; set; } public DateTime DataCriacao { get;...
asked by 12.04.2018 / 22:31