Using a list for Delegate (I learned that this is called a linear function, is that right?) I decrement the list so it gets its values, but I can not do a simple arithmetic operation with "X", because I have a list and "X" happens to be this l...
A question about casting in C #, I see in many sources using cast in the following ways.
What's the difference between one and the other when using one way or another?
public interface InterfaceTeste
{
int Id { get; set; }
}
public...
I am using Resharper to automate overwriting of the Equals method and the == operator. One of the methods the tool overwritten is GetHashCode :
public override int GetHashCode()
{
unchecked
{
return (Id.GetH...
I'm developing an ASP.NET MVC 4 application and need to save the log of every change made to a Model object.
Is there any native method or implementation already known that does this? Example:
public class Pessoa
{
public int? Id { ge...
You have a parent class and a daughter, and would like to execute a particular method, such as an event, always at the end of each method call for the child classes.
How can I do it?
I am trying to load items into a ComboBox from a List<> , it worked fine however, later I would need to get the code for the selected item, but it is not working.
The code to load ComboBox is this:
private void frm...
I have this code, and I have been looking for a way to simplify it using a ternary operator, but I can not because it says I can not use decimal in string:
decimal per;
if (nud_qtPedida.Value != 0)
per = nud_qtFornecida.Value * 100 / nud_qt...
In a Windows Forms application I would like to know how to fetch all files that exist and contain the word teste in the file extension. For example, opening a folder in Windows and typing *.teste* into the search field will return...
I set up a project a while back, as follows,
A class named AutoMapperConfig as follows:
public class AutoMapperConfig
{
public static void RegisterMappings()
{
Mapper.Initialize(x =>
{
x.AddProfile<D...