DCSIMG
DEV - IronShay

Browse by Tags

All Tags » DEV (RSS)

Slides and Code Samples from my Talk at LIDNUG - What?!? C# Could Do That???

On Thursday I had the honor to do a virtual talk at LIDNUG – the LinkedIn .NET User Group. A stage where lots of .NET celebs like Scott Gu, Jeffery Richter, Jeff Prosise and others have talked in the past. I’d like to thank all the attendees and the LIDNUG crew who made this possible – Inbar, Peter and Brian – you guys rock! About the talk – I focused on the dynamic capabilities of C#. Started with some black magic done using the dynamic keyword, then moved on to practice witchcraft with the combination...

My Sessions at NDC2011 and Upcoming Gigs at GOTO, SDC and LINDUG

It’s been a while since NDC2011 took place but I figured out I’ve never officially published the slides and videos from this incredible event. First and foremost, I’d like to thank Program Utvikling for having me as a speaker second year in a row – you guys ROCK! this year’s conference just strengthened my belief that NDC is the best .NET conference out there. So if you have one conference you wanna go to, this is, IMHO, your best pick. Anyway, I had two sessions this year – IronRuby FTW and Ruby...
Posted by shayf | with no comments

My Leading Candidate for Worst C# Feature – Method Hiding

I love C#, I really do. Of course is has its little annoying quirks here and there, but in general it is, IMHO, one of the best static programming languages out there. Having said that, one thing that makes me wonder “WHAT THE HELL WERE THEY THINKNING?!?$?!?” every single time is the feature known as “ Method Hiding ”. What is Method Hiding? Method hiding, in short, is the crippled, mentally-ill brother of method overriding. For example, look at the next code: class A { public string GetName() {...
Posted by shayf | 1 comment(s)
תגים:,

Windows Azure Tip: The "DeleteCurrentDeployment" task failed unexpectedly

Recently I’ve been helping a client to migrate an existing web application to the Azure cloud. We’ve been facing several different obstacles along the way, but most of them were technical. However, today we got to our first “DUDE, I HAVE NO IDEA WHAT’S GOING ON” moment – we got the next error when trying to build the Azure project in Visual Studio: “Error 1  The "DeleteCurrentDeployment" task failed unexpectedly. System.InvalidCastException: Unable to cast COM object of type 'System...
Posted by shayf | with no comments
תגים:,

Upcoming Gig: Expert Days 2011

בחודש הבא אני אשתתף בכנס Expert Days שיתקיים בפארק אזורים בפתח תקוה. הכנס הוא למעשה חמישה ימים של סדנאות פרקטיות בנושאי פיתוח שונים ומאורגן על ידי חברת E4D. תוכלו למצוא בכנס נושאים כמו פיתוח לווב, לענן, לטלפון ועוד. אני אעביר בכנס כשתי סדנאות: HTML5 – בסדנה נעבור על היכולות החדשות של HTML5 ונראה איך ניתן להשתמש באפליקציות שלנו כבר היום. Porting Applications to Windows Azure – בסדנה זאת נעשה מעבר קצר על היכולות של הענן המייקרוסופטי, Windows Azure, ונתמקד בעיקר בתהליך העברת אפליקציות לענן - מתכנון...
Posted by shayf | with no comments
תגים:,

Upcoming Web Developers Community (WDC) Meeting: ASP.NET MVC

ביום שלישי הקרוב, 17.5, אדבר על ASP.NET MVC במפגש קהילת מפתחי הווב. המפגש יתקיים במשרדי מייקרוסופט ברעננה ויתחיל בשעה 17:30. תכנית המפגש היא שתי הרצאות בנות 75 דקות כל אחת. ההרצאה הראשונה תהיה הרצאת מבוא על ASP.NET MVC המיועדת למי שעדיין לא יצא לו לשמוע על תשתית הפיתוח הזו או שרוצה להעמיק את ידיעותיו על האפשרויות והיכולות הטמונות בה. ההרצאה השניה תהיה יותר מתקדמת עם הרבה קוד ובה אני מתכנן להציג כל מיני טיפים ויכולות חבויות של ASP.NET MVC שיכולים להקל עליכם ולקצר את זמן הפיתוח. טכנולוגיה, קוד, אנשים...
Posted by shayf | with no comments

Forget 42, –1 is My New Answer to Life

I’ve just stumbled upon the next code statement – Thread.Sleep(-1) . It left me wondering what was happening there since MSDN tells you nothing about a –1 value for the milliseconds parameter: “The number of milliseconds for which the thread is blocked. Specify zero (0) to indicate that this thread should be suspended to allow other waiting threads to execute. Specify Infinite to block the thread indefinitely.“ – System.Threading.Thread.Sleep, MSDN To check that out, I opened the IronRuby interactive...
Posted by shayf | with no comments
תגים:,

Razor Tip #2: Output Text in Code Context

Razor, the new ASP.NET MVC view engine is incredible. I like it. A LOT. Great work Microsoft! In this series of posts I’m sharing some handy tips and tricks that can enhance your experience with this new view engine. Enjoy! The Problem Razor is the place where HTML and C# live together in harmony. This is, in my opinion, one of the things that make razor the great view engine that it is. However, there’s a fly in the ointment. Assume you want to output “Good Morning!” if the hour is between 6AM and...
Posted by shayf | with no comments

Razor Tip #1: Explicitly Stating Statement Boundaries

Razor, the new ASP.NET MVC view engine is incredible. I like it. A LOT. Great work Microsoft! In this series of posts I’m going to share some handy tips and tricks that can enhance your experience with this new view engine. Enjoy! The Problem You have to output a variable value and add some markup content immediately after it. For example, assume you have a variable holding a value representing a font size and you want to output it inside a style attribute, as follows: But oh no! Razor can’t tell...
Posted by shayf | with no comments
תגים:, , ,

LINQ Tip: Chain Ordering

Assuming you have the next code: public class Person { public string Name { get; set; } public int Age { get; set; } } public class Whatever { public void Do() { var people = new List<Person> { new Person {Name = "Shay Friedman", Age = 27}, new Person {Name = "Shawn Doe", Age = 51}, new Person {Name = "Elvis Presley", Age = 76} }; } } And now you want to order it first by name and then by age using LINQ. If you were to do that: var orderedPeople = people.OrderBy...
Posted by shayf | with no comments

MVP for Another Year!

Two weeks ago I received the email from Microsoft, notifying me that I’m a Microsoft C# MVP for another year! I’m very excited that I get the opportunity to continue and affect future Microsoft releases. Thanks CodeValue, Microsoft Israel and everyone else for the support! I’d also like to congratulate the other renewed MVPs and the new addition to the list of Israeli MVPs – Shlomo Glodberg . Mazal Tov Shlomo! All the best, Shay.
Posted by shayf | with no comments
תגים:,

Slides + Code Samples from my Session at SDC2011

Today I had the honor to talk before the Scandinavian crowd in Gothenburg at SDC2011 . My session was “The Big Comparison of ASP.NET MVC View Engines” where I compared ASPX, Razor, Spark, NHaml and the StringTemplate view engines. Thanks to everyone who attended! I hope you had as much fun as I had!   The code samples from the session can be downloaded from my github account: https://github.com/shayfriedman/AspNetMvcViewEnginesSamples And here are the slides: The Big Comparison of ASP.NET MVC...

My Session at mvcConf 2–The Big Comparison of ASP.NET MVC View Engines

About a month ago I gave a session at the virtual mvcConf 2 event. My session was “The Big Comparison of ASP.NET MVC View Engines” where I talked about the differences between ASPX, NHaml, Spark and the Razor view engines. The session was recorded and it is available on channel 9: http://channel9.msdn.com/Series/mvcConf/mvcConf-2-Shay-Friedman-The-Big-Comparison-of-ASPNET-MVC-View-Engines (at the time of this writing, it has more than 7,500 views! amazing!) During the session I held a few polls about...
Posted by shayf | with no comments

mvcConf, SDC, MIX11 Voting and More

2010 was a great year for me in terms of public speaking and at the moment I’m working on making this year even better! MIX11 is 2 months away and I wanna be there and tell you about writing ASP.NET MVC view engines! But for that I need your help - please vote for my session at http://live.visitmix.com/OpenCall/Vote/Session/55 (the voting ends tomorrow, on Feb 4th). You’ll benefit two things from doing that – you’ll be able to learn about writing ASP.NET MVC view engines at MIX and you’ll enable...
Posted by shayf | with no comments
תגים:,

Developing Excel Functions in C# for Excel 2010 64-Bit

[Cross-posted from http://www.ironshay.com/post/Developing-Excel-Functions-in-C-for-Excel-2010-64-Bit.aspx ] Lately I needed to write a small “add-in” for Excel that adds a function written in C# (another case of “when your 4 years of office add-in development experience comes back to haunt you”). Before going ahead with that I searched the web for a quick how-to and ran into this old but still relevant blog post by Eric Carter. I did everything Eric had described, but every time I tried to add the...
Posted by shayf | 1 comment(s)
תגים:,
More Posts Next page »