Questions tagged as 'c#'

1
answer

Vector start with element greater than 0 (zero)?

Usually a vetor starts from element 0 , and so on until it reaches the size of which it was declared or assigned, eg: string[] v = {1, 2 , 3}; // equivalente á: v[0] = 1; v[1] = 2; v[2] = 3; I want to know how to do in C#...
asked by 13.01.2016 / 19:21
1
answer

Controller routing and actions in lowercase

How to make the controllers and actions routes all in lowercase? For example: instead of Noticias/Details get noticias/details .     
asked by 31.07.2015 / 14:38
3
answers

Use token method GET WebAPI HttpClient

My problem is this: I'm consuming a WebAPI with the PostAsJsonAsync method In this call I'm getting a Token for authentication in the ADMIN methods of an EAD platform we're working on. So far so good. When I call the ADMIN methods by s...
asked by 11.08.2015 / 16:39
1
answer

How to change a property during a LINQ query?

Is there any way to change a LINQ query property of the query itself? Ex: I'm doing a query on List<Cliente> and I want all clients whose NomeFantasia starts with * to have the symbol removed from the name. Her...
asked by 14.08.2015 / 14:48
3
answers

How to access and stop a Thread? ASP.NET C #

Developing in ASP.NET MVC5 and within Action of POST I start a Thread : [HttpPost] [AutorizacaoFilterAttribute] public ActionResult ProcessarEmails(ProcessEmailModel model) { ViewBag.Processing = false; if (ModelSt...
asked by 12.03.2018 / 18:42
3
answers

Relationship Has-in C #?

I tried to make a relationship in C # and I'm not getting it and I do not even know if it's recommended to do it. Here is my error code:    System.NullReferenceException Object reference not set to an instance of an object. class Progra...
asked by 06.02.2015 / 00:15
3
answers

asp.net serving static files

I have an application in mvc3 (asp.net 4.0, dotnet 4.0), running on iis8 (but it's also running on iis 7 and iis 7.5). Within the application I have a folder called /dados example localhost/minhaapp/dados . My clients save HTM...
asked by 13.01.2015 / 18:02
2
answers

How to capture assembly from classes that inherit from a single class

I have numerous classes. All inherit from a single class public abstract class ClasseBase { public int Id {get;set;} } and other classes: public class Teste1 : ClasseBase{ } public class Teste2 : ClasseBase { } You would need to...
asked by 04.12.2014 / 18:56
4
answers

Button with pause function

I have a small application that inserts images into the database. There are many images and sometimes I need to stop the execution for a period and continue at another time so as not to disturb the work of the client. Anyway, my application i...
asked by 30.01.2015 / 12:28
1
answer

Get specific amount of characters from a textbox

I'm trying to get a specific amount of characters typed into a texbox, the current code is as follows: novaconfiguracao.CupomEstabelecimento = tb_NomeFantasia.Text.Substring(0,48).ToString(); In case of typing less than 48 or more than 48 g...
asked by 05.12.2014 / 18:58