Questions tagged as 'c#'

2
answers

What is the purpose of the operator = in the use of lists?

What is the purpose of the => operator in the use of List<T> lists, I'm starting to use generic lists and I came across this operator, it is only used in this method LISTA.ForEach(i => Console.WriteLine(i)); ? Below...
asked by 20.11.2015 / 01:23
2
answers

Best Route Calculation Algorithm

I'm doing a logic system that addresses the route / routing issue. Where should I choose the best route to travel. Initially I'm just doing some testing and testing advanced algorithms, what I'm doing seems like something illogical, but it wi...
asked by 30.12.2014 / 01:53
3
answers

Increment version automatically, and get version number via code

In the software I'm working on, there are users whose doubts should be answered by looking at the software version number. Something of type 10.0.1.1000 configured in the project properties. I would like to know how to increment the versio...
asked by 29.01.2014 / 19:39
3
answers

Create a class dynamically in C #

I have a class "ClassA" and it has a "Attribute" attribute protected. public class ClasseA { protected string Atributo { get; set; } public int Codigo { get; set; } public ClasseA (int codigo) { Codigo = codigo; }...
asked by 20.11.2014 / 18:16
1
answer

How to use IValidatableObject?

How do I use IValidatableObject to not validate a foreign key property during a registration? I want to validate only the foreign key in the edit.     
asked by 27.10.2015 / 02:11
1
answer

Left join with lambda GroupJoin and with condition

How can I make a left join with some conditions using LINQ lambda expressions? In SQL Server I have this query: select usr.Id, usr.FirstName, usr.LastName, ex.Id from User usr left join Exam ex on ex.Id = usr.IdExam and (ex.Id is...
asked by 11.02.2015 / 20:02
2
answers

Uploading Images

I'm trying to upload images to my application. I did a prototype of upload, only it does not show the image, but the ID or NAME of it. And I'm uploading to a folder I've created in my project. My questions are: How do I show this image?...
asked by 29.04.2014 / 15:27
3
answers

How to make a query through LINQ ignoring accents?

I would like to know if you can do a query with LINQ that compares two strings and ignores their accents. That's not my Collation in the database is set to AI and that I do not need to replace in the strings to exit by re...
asked by 12.05.2017 / 04:10
1
answer

Polymorphism or inheritance?

I'm learning about polymorphism and I'm in the doubt whether what I'm doing is actually polymorphism or just inheritance? If it is polymorphism what do you have in my code that I can clearly identify that is polymorphism? If it is not, wha...
asked by 22.09.2016 / 22:17
2
answers

Use Command Line with C #

In my work I use the Command Line, and wanted to improve the work in my company. To do this, I thought about creating a C # program for people who do not know how to work with the command line. I thought of putting a button to open a CNF fi...
asked by 17.04.2015 / 17:52