DCSIMG
Hagit Badash

Recent Posts

0
Comments

"no suitable method found to override" error when generating Moles assembly by hagb

  When you Moles .Net assemblies some times you can encountered problem in the moles instrumentation. You can control the types that you want to moles by editing the .moles file in your project. for example you can configure to mole only the SmtpClient class in the system.dll file as follows: <Moles xmlns=" http://schemas.microsoft.com/moles/2010/" >   <Assembly Name="System" />   <StubGeneration>     <Types>      ...
תגים:, , , ,
0
Comments

The Lambda Expression Pitfall by hagb

Lambda expressions are a simple way to write anonymous methods, delegates and predicates. When using Lambda expression we should be aware of its activation time and what is the arguments’ state during the activation time. For example, look at the following source code: foreach (var item in vm.DataList) { DoAsync(() => { return item; }); } This is a standard way to use delegate for retrieving data. the method DoAsync performs and asynchronous work and uses a delegate to get the work item with the...
תגים:, , , ,
0
Comments

Asynchronous programing in C# by hagb

Recently Microsoft presented a glimpse to the C# 5 by presenting the Visual Studio Async CTP . This new feature allows you to develop asynchronous applications in a very simple way. In the past when you called to an asynchronous method you had to split your code to several segments the code before the async call, the code after the async call completed successfully and the code after the async call failed. Using the visual studio Async feature you do not need to do so anymore. The code of the application...
Powered by Community Server (Commercial Edition), by Telligent Systems