Questions tagged as 'c#'

1
answer

Doubt with decorator [Route ("")]

I have the following controller [Route("micontrolador")] public class MiController : Controller { [Route("micontrolador/miaccion")] public ActionResult Index() => View(); } path micontrolador / miaccion Is it necessar...
asked by 12.06.2018 / 22:23
1
answer

Align content of ItexSharp cells in C #

Good morning, I'm working with C # with the Itextsharp library. Which by pressing a button creates a PDF and inside a small table where it shows the totals. I would like to know how I can align the contents of the cells in a centered way,...
asked by 16.08.2018 / 20:53
2
answers

can not I use the using data directive?

I'm learning C #, I do not know much about IDE, so it can be silly. I needed to create a class library, the "teacher" uses the VS 2015, I use the 2017, he chose the only library of classes that I had, I had several (standard, framework, porta...
asked by 05.06.2018 / 02:27
1
answer

How can I replace multiple texts using Replace?

I'm looking to replace several strings and then write them to a .csv file Everything works well when I replace a single text, but when wanting to replace 2 or more, I only take the last replacement text, which only allows me to put a string a...
asked by 05.06.2018 / 20:18
1
answer

How to know if I click on a line in c #

Good day. I have a small problem, I'm doing a simple graph editor, drawing 2 ellipses and a line that goes to the center of each of those ellipses , I need to click on the line it changes color but I do not have idea of how to know...
asked by 05.06.2018 / 05:29
1
answer

I need Help with async Task.

When I create a method it appears in red and I get that error from the image. please someone help me?     
asked by 22.05.2018 / 17:19
1
answer

How to show the data of a List of Objects (collection) in C #?

They ask me to create a Race and an Athlete class, and show some data by console. In the Career Class I have to create a method that orders the contestants alphabetically. I tried to take the first and last, and it's all good. My problem is...
asked by 30.04.2018 / 08:24
1
answer

How to change the background color of several buttons at once in windows forms?

The thing is like this: I have two forms, Form1 and Form2 . Form1 is the main one and has 20 buttons which each represents a different table of my restaurant. Clicking on any of them opens a Form2 in which you can r...
asked by 28.05.2018 / 03:05
1
answer

problem when searching a list c #

I have a list of books and I want to find one but at the time of doing it, it is not returning it to me. Instance of the list: public class Biblioteca { public List<Libro> LaListaDeLibros { get; set; } public Biblioteca()...
asked by 08.05.2018 / 20:50
2
answers

Hide and show controls in ASP.Net C #

I am working on ASP: NET C #. I have an imageButton hidden in my MasterPage, for this I used a class defined in a style sheet. In the design mode I see that the control is hidden but when loading the page, the control appears visible. What I wa...
asked by 03.05.2018 / 17:54