DotNetShoutout - Stories tagged with CSharp
4
Shouts

C#/.NET Little Wonders: Skip() and Take()

published 414 days, 11 hours, 53 minutes ago posted by BlackRabbitCoderBlackRabbitCoder 419 days, 21 hours, 38 minutes ago
Wednesday, April 04, 2012 10:04:00 AM GMT Friday, March 30, 2012 12:19:05 AM GMT
I’ve covered many valuable methods from System.Linq class library before, so you already know it’s packed with extension-method goodness. Today I’d like to cover two small families I’ve neglected to mention before: Skip() and Take(). While these methods seem so simple, they are an easy way to create sub-sequences for IEnumerable (more)
category: Web Dev | clicked: 82 | 1 comment | | source: www.blackrabbitcoder.net
tags: .NET, Little Wonders, Take, C#, Skip, CSharp, Linq, TakeWhile, SkipWhile
5
Shouts

Asynchronous programming in C# 5

published 430 days, 14 hours, 8 minutes ago posted by traskjdtraskjd 435 days, 13 hours, 55 minutes ago
Monday, March 19, 2012 7:49:15 AM GMT Wednesday, March 14, 2012 8:02:28 AM GMT
One of the more radical design decisions in the forthcoming Windows Runtime is that no API may, even potentially, take more than 50 milliseconds to complete. Operations that could take longer than that will instead have a 'kick off this operation' API that returns immediately without waiting for the result of the operation. Discover how this will change how .NET developers write code and what C# 5 includes to take advantage of this new focus on Async. (more)
category: How To | clicked: 86 | comment | | source: www.mindscapehq.com
tags: Async, CSharp, await, Mindscape
3
Shouts

C#/.NET Little Wonders – The DateTimeOffset struct

published 435 days, 14 hours, 1 minute ago posted by BlackRabbitCoderBlackRabbitCoder 440 days, 21 hours, 16 minutes ago
Wednesday, March 14, 2012 7:55:55 AM GMT Friday, March 09, 2012 12:41:09 AM GMT
While the DateTime is a powerful structure for parsing, manipulating, and comparing date-times, it becomes problematic when handling times from different time-zones. The DateTimeOffset is much more portable in that it preserves the offset from UTC. (more)
category: Web Dev | clicked: 58 | 2 comments | | source: www.blackrabbitcoder.net
tags: .NET, Little Wonders, C#, DateTimeoffset, CSharp
3
Shouts

Inter-Process Communication using MemoryMappingFile

published 451 days, 12 hours, 9 minutes ago posted by abhi2434abhi2434 451 days, 22 hours, 22 minutes ago
Monday, February 27, 2012 9:47:43 AM GMT Sunday, February 26, 2012 11:35:32 PM GMT
In an operating system, a Memory Mapping file are virtual storage place which has direct byte to byte correlation between the Virtual Address Space and the corresponding physical storage. So when we access the Virtual Address space via a memory mapping file we are directly communicating with the kernel space where the file is actually loaded. The portion of calculation between the physical storage and logical storage is hence avoided. Memory Mapping files allows application to access files in the sam... (more)
category: Architecture | clicked: 18 | comment | | source: www.abhisheksur.com
tags: MemoryMappedFile, dotnet, Inter process communication, CSharp
2
Shouts

C#/.NET Little Wonders: The SequenceEqual() Method

published 458 days, 22 hours, 23 minutes ago posted by BlackRabbitCoderBlackRabbitCoder 461 days, 20 hours, 28 minutes ago
Sunday, February 19, 2012 11:34:36 PM GMT Friday, February 17, 2012 1:29:06 AM GMT
This post examines a handy method of the Enumerable class that allows you to check if two sequences of values are equal. Equality of two sequences is defined as two sequences of the same length with equivalent values in the same order from both sequences. (more)
category: Web Dev | clicked: 51 | 2 comments | | source: www.blackrabbitcoder.net
tags: .NET, Little Wonders, SequenceEqual, C#, IEnumerable, enumerable, CSharp, Linq
2
Shouts

C#/.NET Little Pitfalls: Stopwatch Ticks are not TimeSpan Ticks

published 494 days, 10 hours, 3 minutes ago posted by BlackRabbitCoderBlackRabbitCoder 496 days, 21 hours, 24 minutes ago
Sunday, January 15, 2012 11:54:38 AM GMT Friday, January 13, 2012 12:32:42 AM GMT
The System.Diagnostics.Stopwatch class is very useful for elapsed time measurements in .NET applications. Today we’ll look at the ElapsedTicks member of the Stopwatch class, and some of the confusion of what this quantity represents, especially compared to TimeSpan or DateTime Ticks. (more)
category: Web Dev | clicked: 12 | 2 comments | | source: www.blackrabbitcoder.net
tags: .NET, DateTime, C#, Stopwatch, CSharp, TimeSpan, Little Pitfalls
2
Shouts

C#/.NET Little Wonders: The DateTime TryParsae() and ParseExact() Methods

published 501 days, 8 hours, 13 minutes ago posted by BlackRabbitCoderBlackRabbitCoder 503 days, 21 hours, 13 minutes ago
Sunday, January 08, 2012 1:43:59 PM GMT Friday, January 06, 2012 12:44:17 AM GMT
A while back I talked about some goodies in DateTime, mostly the properties that let you split out just the date or time. This week, I wanted to look at a couple more methods of the DateTime struct that give you additional control over parsing an input string into a DateTime. Most of us have dealt with using DateTime.Parse() for these tasks, but sometimes you are wanting to parse something that may not be a valid DateTime, or may be in a non-standard format. So let’s look at the TryParse() and ParseEx... (more)
category: Web Dev | clicked: 13 | 2 comments | | source: blackrabbitcoder.net
tags: .NET, DateTime, Parse, Little Wonders, C#, ParseExact, TryParse, CSharp
5
Shouts

C#/.NET Fundamentals: Unit Testing with Func Generators

published 514 days, 13 hours, 42 minutes ago posted by BlackRabbitCoderBlackRabbitCoder 517 days, 22 hours, 19 minutes ago
Monday, December 26, 2011 8:15:27 AM GMT Thursday, December 22, 2011 11:38:06 PM GMT
I wanted to attempt a brief post before the holidays, so I decided to quickly revisit part a post I wrote a few weeks back on The Generic Func Delegates, and in particular, the sidebar on using Func as a generator for unit testing. At the time, I did not give that short sidebar the attention I really wanted, including showing the setup of the unit tests and discussing the performance impact (if any) of such a practice. So this week I hope to rectify this by revisiting and enhancing the discussion. (more)
category: Web Dev | clicked: 11 | 1 comment | | source: www.blackrabbitcoder.net
tags: .NET, C#, fundamentals, delegates, Func, CSharp, unit testing
4
Shouts

C# Fundamentals: Returning Zero or One Item As IEnumerable

published 529 days, 9 hours, 45 minutes ago posted by BlackRabbitCoderBlackRabbitCoder 531 days, 21 hours, 21 minutes ago
Sunday, December 11, 2011 12:12:15 PM GMT Friday, December 09, 2011 12:36:09 AM GMT
There are times when we are writing a method that returns a sequence of items, that it occasionally becomes necessary in base-class, interface implementation, error, or default conditions to return a sequence of only one or even zero items. There are many ways to do this, of course, which begs the question of which way is best, in terms of readability, maintainability, and performance. (more)
category: Web Dev | clicked: 21 | 1 comment | | source: blackrabbitcoder.net
tags: .NET, C#, fundamentals, IEnumerable, CSharp
2
Shouts

C#/.NET Fundamentals: Safely and Efficiently Raising Events

posted by BlackRabbitCoderBlackRabbitCoder 538 days, 18 hours, 18 minutes ago
Friday, December 02, 2011 3:39:04 AM GMT
A couple of posts ago, I discussed the EventHandler (more)
category: Web Dev | clicked: 6 | 1 comment | | source: www.blackrabbitcoder.net
tags: .NET, C#, fundamentals, delegates, Events, CSharp
6
Shouts

Reflection, performance and runtime code generation

published 538 days, 7 hours, 46 minutes ago posted by traskjdtraskjd 542 days, 19 hours, 14 minutes ago
Friday, December 02, 2011 2:11:13 PM GMT Monday, November 28, 2011 2:43:31 AM GMT
Most .NET developers know about the power of working with Reflection, but when performance becomes an issue what can we do? This post examines the performance benefits of using runtime code generation while noting some of the limitations. This post will give you everything you need to know about choosing between different techniques and when it's right to choose one over the others. (more)
category: How To | clicked: 26 | 1 comment | | source: www.mindscapehq.com
tags: Expression Tree, Code Generation, Reflection, CSharp, Mindscape
3
Shouts

C#/.NET Little Wonders: The Predicate, Comparison, and Converter Generic Delegates

published 544 days, 17 hours, 32 minutes ago posted by BlackRabbitCoderBlackRabbitCoder 545 days, 18 hours, 43 minutes ago
Saturday, November 26, 2011 4:25:17 AM GMT Friday, November 25, 2011 3:14:24 AM GMT
In the last three weeks, we examined the Action family of delegates (and delegates in general), the Func family of delegates, and the EventHandler family of delegates and how they can be used to support generic, reusable algorithms and classes. This week I will be completing my series on the generic delegates in the .NET Framework with a discussion of three more, somewhat less used, generic delegates: Predicate (more)
category: Web Dev | clicked: 33 | 2 comments | | source: blackrabbitcoder.net
tags: .NET, Generics, Little Wonders, C#, delegates, CSharp
3
Shouts

C#/.NET Little Wonders: The Generic Func Delegates

published 557 days, 15 hours, 31 minutes ago posted by BlackRabbitCoderBlackRabbitCoder 559 days, 21 hours, 32 minutes ago
Sunday, November 13, 2011 6:26:32 AM GMT Friday, November 11, 2011 12:24:49 AM GMT
Back in one of my three original “Little Wonders” Trilogy of posts, I had listed generic delegates as one of the Little Wonders of .NET. Later, someone posted a comment saying said that they would love more detail on the generic delegates and their uses, since my original entry just scratched the surface of them. Last week, I began our look at some of the handy generic delegates built into .NET with a description of delegates in general, and the Action family of delegates. For this week, I’ll launch i... (more)
category: Web Dev | clicked: 16 | 1 comment | | source: blackrabbitcoder.net
tags: .NET, Little Wonders, C#, delegates, Func, CSharp
4
Shouts

C#/.NET Little Wonders: The Generic Action Delegates

posted by BlackRabbitCoderBlackRabbitCoder 566 days, 20 hours, 38 minutes ago
Friday, November 04, 2011 1:18:52 AM GMT
Back in one of my three original “Little Wonders” Trilogy of posts, I had listed generic delegates as one of the Little Wonders of .NET. Later, someone posted a comment saying said that they would love more detail on the generic delegates and their uses, since my original entry just scratched the surface on them. So over the next few weeks, I’ll be looking at some of the handy generic delegates built into .NET. For this week, I’ll give a quick overview of delegates and their usefulness. Then I’ll lau... (more)
category: Web Dev | clicked: 3 | comment | | source: www.blackrabbitcoder.net
tags: .NET, Little Wonders, C#, delegates, CSharp, action
2
Shouts

How to: Delete all files from a particular folder using ASP.NET - Webwizo's Blog

published 574 days, 7 hours, 7 minutes ago posted by webwizowebwizo 574 days, 14 hours, 38 minutes ago
Thursday, October 27, 2011 2:49:45 PM GMT Thursday, October 27, 2011 7:18:53 AM GMT
Delete all files method is being used when you store uploaded temporary files in specific folder and want to remove all now. Here I am showing very easy and little method which will definitely help you out. (more)
category: Web Dev | clicked: 18 | 1 comment | | source: blog.webwizo.com
tags: ASP .NET, VB .NET, CSharp, C# .NET
2
Shouts

C#/.NET Little Wonders: TPL Wonders - The Parallel.For() Method

posted by BlackRabbitCoderBlackRabbitCoder 580 days, 20 hours, 48 minutes ago
Friday, October 21, 2011 1:09:31 AM GMT
Previously, I had created some posts about the Task Parallel Library’s Concurrent Collections – which are very efficient collections designed for concurrent use with minimal contention – but in this next series of Little Wonders posts, I’d like to explore the parts of the TPL that can simplify and improve the way you perform parallel programming. For this week, we are going to start looking at the Parallel static class’s, For() static method, which is a quick and easy way to perform parallel processing ... (more)
category: Web Dev | clicked: 5 | comment | | source: blackrabbitcoder.net
tags: .NET, TPL, Little Wonders, Parallel, C#, for, CSharp
2
Shouts

C#/.NET Toolbox: Creating a "Safer" Task Dispose()

posted by BlackRabbitCoderBlackRabbitCoder 594 days, 21 hours, 4 minutes ago
Friday, October 07, 2011 12:52:42 AM GMT
So recently, I’ve been moving some older utility classes logic over to use the excellent .NET Task Parallel Library (TPL). This library contains, at it’s core, a class called Task which allows parallel programming without the need of working directly with threads. During this process, I wrote a few extension methods I found to be useful in dealing with tasks in an easier manner, and thought I’d share them in a few posts. Today's will discuss an extension method to make disposing a task a little bit "sa... (more)
category: Web Dev | clicked: 12 | 2 comments | | source: www.blackrabbitcoder.net
tags: .NET, TPL, C#, Task, ToolBox, CSharp, Dispose
2
Shouts

Internals of .NET Objects and Use of SOS

posted by abhi2434abhi2434 605 days, 2 hours, 34 minutes ago
Monday, September 26, 2011 7:23:06 PM GMT
Well, now getting deeper into the facts, lets talk about how objects are created in .NET and how type system is laid out in memory for this post in my Internals Series.  As this is going to be very deep dive post, I would recommend to read this only if you want to kill your time to know the internal details of .NET runtime and also you have considerable working experience with the CLR types and type system. Recently I have been talking with somebody regarding the actual difference between the C++ t... (more)
category: Architecture | clicked: 5 | 1 comment | | source: www.abhisheksur.com
tags: dotnet, internals, CSharp
2
Shouts

C#/.NET Little Wonders: String Padding and Trimming - Not Just for Spaces!

posted by BlackRabbitCoderBlackRabbitCoder 608 days, 21 hours, 57 minutes ago
Friday, September 23, 2011 12:00:30 AM GMT
I’m going to wrap up my little side excursion into the String class with just a quick post on two features we’ve probably all used from time to time, but with a little twist: padding and trimming. Yes, we’ve probably all padded strings with spaces and numbers with zeros before, or trimmed off extra spaces, but did you know these methods aren’t just confined to whitespace? (more)
category: Web Dev | clicked: 0 | comment | | source: www.blackrabbitcoder.net
tags: .NET, String, Little Wonders, C#, CSharp, pad, trim
3
Shouts

C#/.NET Little Wonders: The String Remove() and Replace() Methods

posted by BlackRabbitCoderBlackRabbitCoder 615 days, 22 hours, 16 minutes ago
Thursday, September 15, 2011 11:41:02 PM GMT
When manipulating string data, many times you want to either remove parts of a String or replace characters in a String. You can do this yourself, of course, by building a new String while manually inspecting each char in turn, but this gets to be a bit expensive and is less maintainable. Instead, there are two methods in the String class, ready to use, that let you do this easily: Remove() and Replace(). (more)
category: Web Dev | clicked: 2 | comment | | source: www.blackrabbitcoder.net
tags: .NET, String, Little Wonders, C#, replace, remove, CSharp
Previous 1 2 3 4 Next