// Make an array copy and print the 2.
int[] original = new int[] { 2, 5, 3, 8, 9, 12, 15, 7 };
int[] copia = new int[original.Length];
for (int index = 0; index < original.Length; index++)
{
cop...
I have an ordered list, that I need to display only the first 5 items, not all the bank records, so I'm not getting it. Here is my code as it is:
public class DashboardController : Controller
{
private NFeWebContext db = new NFeWeb...
I just uploaded my system to the server, so I went to do the first tests and this is causing the following errors in my Javascript scripts
/* Minification failed. Returning unminified contents.
(1,1): run-time error CSS1019: Unexpected token,...
I created an empty Asp.Net Core 2.0 project (without scaffold). Model DDD and etc. But when I try to create my controller, it is inherited from ApiController or Controller, it gives error:
Controller is a namespace, but is used as a type...
Hello, I'm working with C # and I have the following situation:
I have 2 classes in the system, Order and ProductSold ;
Order contains as property List<ProductSold> ;
In a given ViewModel, I have to get a...
I have a C # application that performs a search. For this is used a field called 'status' that nothing else a list in a combobox. I need it to appear in addition to the statuses that come from the bank, a status called 'ALL' that does not exist...
I'm trying to get back to the previous page, like this:
string urlAnterior = Request.Headers["Referer"].ToString();
if (urlAnterior.Contains("Pagina"))
return RedirectToAction("");
else
return RedirectT...
I'm working with a main Form and it has several Panels. In one of them, the "general panel" I use to call instances of new forms and show on it using the following code from the FormCall class:
public void chamaFormulario(Form form)
{...
I am a Java developer studying C # and I came across the following difference between the two languages:
link
Generics
Generics are much less fiddly in C #. Partially because they are both compile-time and run-time concept....
I will have 3 buttons, each with a different id, how do I pass this id to the action of my controller when it is clicked?
public IActionResult Index(int id)
{
var lista = _listaService.sites(id);
return View(lista);
}...