This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var config = new MapperConfiguration(c => | |
{ | |
c.CreateMap<SourceClass, TargetClass>() | |
.ForMember(x => x.Vals, o => o.MapFrom((srcCls, trgCls) => | |
{ | |
trgCls.Vals.Clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Square { | |
private int _SideLength; | |
public int SideLength { | |
get => _SideLength; | |
set => _SideLength = value; | |
} | |
public int Area { | |
get => _SideLength * _SideLength; |