DotNetShoutout - Stories tagged with C# 4.0
2
Shouts

Groovy Like ConfigSlurper in C# using ExpandoObject « Sankarsan’s Journal

published 643 days, 14 hours, 10 minutes ago posted by http://sankarsan.myopenid.com/http://sankarsan.myopenid.com/ 644 days, 18 minutes ago
Monday, August 22, 2011 4:24:46 AM GMT Sunday, August 21, 2011 6:16:55 PM GMT
In GroovyConfigSlurper is a utility class that is used for reading configuration files written in form of Groovy scripts.Let’s consider the following properties file. We will use a Groovy script to read from this properties file as shown in the snippet below: package com.test import java.util.Properties class Start { static main(args) { def p = new Properties() new File("test.properties").withInputStream { stream -> p.load(stream) } println "gfv3.admin.... (more)
category: How To | clicked: 14 | comment | | source: sankarsan.wordpress.com
tags: dynamic, C# 4.0, Expando, Groovy
3
Shouts

Parallel for loop in C# 4.0

posted by http://jalpesh.blogspot.com/http://jalpesh.blogspot.com/ 684 days, 8 hours, 26 minutes ago
Tuesday, July 12, 2011 10:08:54 AM GMT
Now days we are getting our computer equipped with more and more power even now we are getting quad core processor is also at lower price. Since we have multicore processors are now so we can take advantages of multicore processor with parallel execution in C# 4.0. There are some time consuming task for the computer for example a long for loop or similar kind of things. This kind of task can be done parallel with parallel class in C# 4.0. Now in C# 4.0 you have the Parallel static class with the help of... (more)
category: Web Dev | clicked: 0 | comment | | source: jalpesh.blogspot.com
tags: Parallel, C# 4.0
3
Shouts

ExpandoObject class in C# 4.0

published 772 days, 10 hours, 48 minutes ago posted by http://jalpesh.blogspot.com/http://jalpesh.blogspot.com/ 773 days, 22 hours, 14 minutes ago
Friday, April 15, 2011 7:46:27 AM GMT Wednesday, April 13, 2011 8:21:13 PM GMT
As you know till now in c# everything was static and known at design time. But with the C# 4.0 language Microsoft have enabled new dynamic data type which is belongs to Dynamic Language Runtime on top of CLR(Common language Runtime). As you know that dynamic object will know their behaviour at run time. Here Microsoft has given one new class called ExpandoObject class. ExpandoObject class is a member of System.Dynamic namespace and is defined in the System.Core assembly. This class object members can be... (more)
category: Agile | clicked: 2 | comment | | source: jalpesh.blogspot.com
tags: C# 4.0, ExpandoObject
3
Shouts

.NET Framework 4.0-Guid.Parse Method

published 872 days, 23 minutes ago posted by http://jalpesh.blogspot.com/http://jalpesh.blogspot.com/ 875 days, 9 minutes ago
Wednesday, January 05, 2011 6:11:52 PM GMT Sunday, January 02, 2011 6:25:17 PM GMT
In earlier version of .NET framework we don’t have Guid.Parse method Now we have an Guid.Parse method in .NET Framework and it’s work like any parse method. Let’s see it by an example. Let’s create console application for that.class Program { static void Main(string[] args) { string newID = "f718943d-757d-4975-947b-3dbff1205be6"; Guid myGuId = Guid.Parse(newID); Console.WriteLine(myGuId.ToString()); Console.ReadLine(); } } and as expected here is the out... (more)
category: Web Dev | clicked: 0 | comment | | source: jalpesh.blogspot.com
tags: C# 4.0, ASP.NET 4, GUID
3
Shouts

Collection initializer in C# 3.0 : The CodeGain

posted by codegaincodegain 990 days, 12 hours, 20 minutes ago
Thursday, September 09, 2010 6:14:41 AM GMT
In this article, i have demonstrate how to create collection initializer in C# 3.0 (more)
category: How To | clicked: 0 | comment | | source: www.codegain.com
tags: C#, C# 4.0, C# 3.0
6
Shouts

Implementation of an Observer

published 1000 days, 2 hours, 58 minutes ago posted by abhi2434abhi2434 1001 days, 2 hours, 19 minutes ago
Monday, August 30, 2010 3:36:48 PM GMT Sunday, August 29, 2010 4:15:39 PM GMT
Hi Folks, As few people told me to implement an observer in my last post where I just showed how to use it, here is the post where I am going to clear out confusions for you. If you have read my other post, you might already know what is an Observer and why it is required. Lets recap this a bit more. An observer is a container which observes each element individually and notifies you when the object state is modified. The observer should contain methods that enables you to subscribe or unsubscrib... (more)
category: How To | clicked: 0 | comment | | source: www.abhisheksur.com
tags: Reactive, Observer Pattern, C# 4.0, observer
5
Shouts

The collection of extension methods in C# : The CodeGain

published 1013 days, 2 hours, 13 minutes ago posted by codegaincodegain 1014 days, 12 hours, 29 minutes ago
Tuesday, August 17, 2010 4:21:41 PM GMT Monday, August 16, 2010 6:05:25 AM GMT
In this codesnippet, you can see examples for extension methods in C# (more)
category: How To | clicked: 0 | comment | | source: www.codegain.com
tags: .NET, Extension Methods, C#, C# 4.0, C# 3.0
3
Shouts

Subspace .NET Blog | Getting rid of null checks in property chains with - but not limited to - AutoMapper and S#arpArchitecture

posted by http://sandord.myopenid.com/http://sandord.myopenid.com/ 1018 days, 7 hours, 30 minutes ago
Thursday, August 12, 2010 11:05:13 AM GMT
As I was doing some entity to DTO mapping using AutoMapper, I found myself writing a lot of null checks when mapping nested properties. Those checks are often necessary because one or more properties in the chain may be null. For example, string zipCode = customer.Address.ZipCode; may throw a NullReferenceException when either customer or Address is null. This is often handled by writing code like this: string zipCode = (customer != null ? (customer.Address != null ? (customer.Address.ZipCode... (more)
category: Architecture | clicked: 3 | comment | | source: blog.subspace.nl
tags: C# 4.0
6
Shouts

Lazy Initializer : C# 4.0

published 1062 days, 4 hours, 56 minutes ago posted by dotnetfundadotnetfunda 1064 days, 15 hours, 39 minutes ago
Tuesday, June 29, 2010 1:38:41 PM GMT Sunday, June 27, 2010 2:55:19 AM GMT
In .NET 4.0 a new set of classes are introduced to defer the creation of expensive objects when not in use. In this article, I have discussed how you can use Lazy classes to ensure that every object is created only when it is required. (more)
category: Web Dev | clicked: 0 | comment | | source: www.dotnetfunda.com
tags: C# 4.0
6
Shouts

C# 2010 - A look

published 1062 days, 4 hours, 56 minutes ago posted by dotnetfundadotnetfunda 1065 days, 3 hours, 16 minutes ago
Tuesday, June 29, 2010 1:38:41 PM GMT Saturday, June 26, 2010 3:18:36 PM GMT
With the release of .NET 2010, C# as a language also changed a bit. In this article I am going to introduce some of the basic changes that C# 4.0 comes with and which one must know before going on developing a product in this. (more)
category: Web Dev | clicked: 0 | comment | | source: www.dotnetfunda.com
tags: C# 4.0
5
Shouts

Optional and Named Parameters in C# 4.0 | Senthil Kumar's Blog

published 1070 days, 4 hours, 6 minutes ago posted by http://isenthil.myopenid.com/http://isenthil.myopenid.com/ 1070 days, 17 hours, 11 minutes ago
Monday, June 21, 2010 2:28:30 PM GMT Monday, June 21, 2010 1:23:29 AM GMT
Optional parameters and named Parameters are the new features in C# 4.0.It provides the ability to define a parameter for a function with some default value. Visual Basic had the optional parameters and this is newly introduced in C# 4.0 . ... (more)
category: How To | clicked: 0 | comment | | source: www.ginktage.com
tags: .NET, C# 4.0
3
Shouts

C# 4.0:Finding if the string contains only WhiteSpace or Null | Senthil Kumar's Blog

published 1075 days, 7 hours, 52 minutes ago posted by http://isenthil.myopenid.com/http://isenthil.myopenid.com/ 1076 days, 1 hour, 4 minutes ago
Wednesday, June 16, 2010 10:42:58 AM GMT Tuesday, June 15, 2010 5:30:16 PM GMT
In the the previous Versions of the C# ,To check if the string is null or empty , we do it something similar to the example stated below.if (input == null || (input == "") { Console.WriteLine("The string is Null or Empty"); } The method string.IsNullOrEmpty in earlier versions of C# ,enables to check for the string if it is null or empty .Eg : if (string.IsNullOrEmpty((input )) { Console.Wri... (more)
category: Architecture | clicked: 0 | comment | | source: www.ginktage.com
tags: C# 4.0
8
Shouts

Parallel Programming in .NET Framework 4: Getting Started - C# Frequently Asked Questions - Alexandra Rusina

published 1086 days, 6 hours, 51 minutes ago posted by iftekharahmedamitiftekharahmedamit 1088 days, 19 hours, 10 minutes ago
Saturday, June 05, 2010 11:43:25 AM GMT Wednesday, June 02, 2010 11:24:36 PM GMT
With this post I want to start a series devoted to the new parallel programming features in .NET Framework 4 and introduce you the Task Parallel Library (TPL). I have to admit that I’m not an expert in multithreading or parallel computing. However, people often ask me about easy introductions and beginner’s samples for new features. And I have an enormous advantage over most newbies in this area – I can ask people who developed this library about what I’m doing wrong and what to do next... (more)
category: Architecture | clicked: 4 | 1 comment | | source: blogs.msdn.com
tags: Parallel Processing, TPL, .NET Framework, Task Parallel Library, C#, Parallel Programming, WPF, C# 4.0, .NET Framework 4.0
6
Shouts

Heartysoft.com | Anonymous Types are Internal, C# 4.0 Dynamic Beware!

published 1095 days, 6 hours, 4 minutes ago posted by ashicashic 1095 days, 19 hours, 1 minute ago
Thursday, May 27, 2010 12:30:52 PM GMT Wednesday, May 26, 2010 11:33:57 PM GMT
This article explains why C# 4.0's dynamic features don't seem to work when evaluating instances of anonymous types returned from a public method of a different assembly. (more)
category: How To | clicked: 1 | 1 comment | | source: www.heartysoft.com
tags: C# 4.0
5
Shouts

C# 4.0 AccessPrivateWrapper – Instantiate and Access Private/Internal Classes and Members via dynamic + reflection

published 1097 days, 5 hours, 52 minutes ago posted by http://amazedsaint.blogspot.com/http://amazedsaint.blogspot.com/ 1098 days, 2 hours, 13 minutes ago
Tuesday, May 25, 2010 12:43:13 PM GMT Monday, May 24, 2010 4:21:35 PM GMT
A C# dynamic wrapper to expose private classes, private types etc. If you have a reason to access private members, or to un earth internal or private classes use this. (more)
category: How To | clicked: 10 | 1 comment | | source: amazedsaint.blogspot.com
tags: dynamic, C#, C# 4.0, Reflection
2
Shouts

Adventures in MVVM – My ViewModel Base

published 1113 days, 9 hours, 11 minutes ago posted by BrianGenisioBrianGenisio 1113 days, 17 hours, 20 minutes ago
Sunday, May 09, 2010 9:23:22 AM GMT Sunday, May 09, 2010 1:14:55 AM GMT
First, I’d like to say: THIS IS NOT A NEW MVVM FRAMEWORK. That being said, I want to share my ViewModel base class with the world. It has a lot of features, all designed to reduce the friction in writing view models. (more)
category: How To | clicked: 1 | comment | | source: houseofbilz.com
tags: dynamic, WPF, C# 4.0, MVVM
5
Shouts

Cutting Edge - Using the Dynamic Keyword in C# 4.0

published 1116 days, 8 hours, 7 minutes ago posted by https://me.yahoo.com/mosessaur#7fe0dhttps://me.yahoo.com/mosessaur#7fe0d 1117 days, 10 hours, 46 minutes ago
Thursday, May 06, 2010 10:27:30 AM GMT Wednesday, May 05, 2010 7:48:51 AM GMT
C# 4 provide a new dynamic keyword that enables dynamic typing in what has traditionally been a strongly typed language. We explain how the dynamic keyword works and what it offers that casting, var, and System.Object cant’ match. (more)
category: How To | clicked: 0 | 2 comments | | source: msdn.microsoft.com
tags: dynamic, C# 4, C#, MSDN, C# 4.0, MSDN Magazine
4
Shouts

Covariance & Contravariance for Generic Interfaces & Delegates in C# 4.0

posted by kitchaiyongkitchaiyong 1173 days, 14 hours, 24 minutes ago
Wednesday, March 10, 2010 4:11:13 AM GMT
Explain the Covariance and Contravariance for Generic Interfaces and Delegates in C# 4.0. (more)
category: Architecture | clicked: 0 | comment | | source: www.kitchaiyong.net
tags: covaraince and contravariance, C# 4.0
9
Shouts

C# 4.0 dynamic keyword for Dummies – Under the hood

published 1178 days, 4 hours, 1 minute ago posted by http://amazedsaint.blogspot.com/http://amazedsaint.blogspot.com/ 1179 days, 9 hours, 25 minutes ago
Friday, March 05, 2010 2:33:53 PM GMT Thursday, March 04, 2010 9:09:33 AM GMT
In this post, we’ll go back to the basics to uncover few interesting aspects of C# 4.0 dynamic features. Let us start with a simple experiment. Static Typing or Early Binding Let us start with a bare minimum program. Fire up VS2010 and try the following code. It is obvious that this won’t compile. Simply because, the compile/design time checking ensures type safety - and as we don’t have a method named SomeStupidCall in our Human class, we can’t compile the same. So, that is what you get. Du... (more)
category: How To | clicked: 2 | 1 comment | | source: amazedsaint.blogspot.com
tags: dynamic, C#, C# 4.0, VS2010
7
Shouts

Covariance and Contravariance FAQ

published 1194 days, 4 hours, 43 minutes ago posted by http://csharpfaq.myopenid.com/http://csharpfaq.myopenid.com/ 1194 days, 19 hours, 35 minutes ago
Wednesday, February 17, 2010 1:51:42 PM GMT Tuesday, February 16, 2010 11:00:12 PM GMT
Covariance and Contravariance FAQPublished 16 February 10 06:50 PM In this post I’ll try to answer the most common questions I find on forums and in documentation feedback about C# covariance and contravariance. It’s a big topic for a single blog post, so expect to see a lot of “more information” links. (more)
category: How To | clicked: 0 | comment | | source: blogs.msdn.com
tags: covaraince and contravariance, C# 4.0
Previous 1 2 Next