Wednesday, January 29, 2014

Sorting a List in C#

I often receive emails from developers asking for help with their development conundrums. One of the common questions I get asked, especially from someone learning C# and writing their first app, is how to sort a list of items.

It's quite simple actually; there are 2 ways you can sort a list, and both have their own purpose as defined below.

Using the first method you can sort a list in place, i.e. without having to create a copy of the list. E.g. if you had a list of an object which contained a date and you would like to sort the list in chronological order, you can do something like the following:

MyList.Sort((x, y) => x.OrderDate.CompareTo(y.OrderDate));

The second method does not sort the list in place, but rather returns a sorted copy of the original list:

List<Employees> lstEmployees = MyList.OrderBy(emp => emp.JoinDate).ThenBy(emp => emp.empID).ToList();

This example also shows you how to sort the list based on 2 parameters, in this case Employee Join Date and Employee ID, so if there were multiple employees who joined the company on the same date, they will be further sorted by their Employee ID.

Hope this helps!

Regards,
Paras Wadehra
Nokia Developer Ambassador
INETA Community Champion
Twitter: @ParasWadehra

Saturday, January 4, 2014

The build stopped unexpectedly because of an internal failure.

If you ever receive the following error while doing development in Visual Studio, don't fret, it just means your system is running low on memory. Close a few apps, or restart Visual Studio and/or your system, if need be, and then try rebuilding your app and it should work like a charm!

The build stopped unexpectedly because of an internal failure.

Microsoft.Build.Exceptions.BuildAbortedException: Build was canceled. Failed to successfully launch or connect to a child MSBuild.exe process. Verify that the MSBuild.exe "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" launches successfully, and that it is loading the same microsoft.build.dll that the launching process loaded. If the location seems incorrect, try specifying the correct location in the BuildParameters object, or with the MSBUILD_EXE_PATH environment variable.

Happy New Year,
Paras Wadehra
Nokia Developer Ambassador
INETA Community Champion
Microsoft Windows Phone Champ

Thursday, October 24, 2013

Microsoft Tech Affiliate, for the win!

I have been part of Microsoft Tech Affiliate for just over a year now. I initially joined it just so that I can get some online promotion for my user group meetings and events I speak at.

Soon, they introduced rewards system where someone like me could earn points for hosting and/or speaking at events. I quickly ramped up on a bunch of points given my community participation and engagement.

To give you little background, I have been developing applications for Microsoft platforms for over a decade now. I have done desktop development, web development and most recently mobile app development pretty extensively. I love speaking at events, attending and even hosting my own events and hackathons as much as I can in my spare time, given a demanding day job.

You can find all my apps in the Windows Phone US Store at http://www.windowsphone.com/en-US/store/publishers?publisherId=Paras%20Wadehra and in the Windows 8 Store at http://apps.microsoft.com/windows/app/978058d8-1380-4c28-8254-d1270d11ab69 and http://apps.microsoft.com/windows/app/15f6278c-3c3b-492e-a82f-691ad1b45f5b You will quickly see that I am a hobbyist when it comes to developing apps on my own - I developed games and entertainment apps as well as utility apps, social apps, movie apps, books and reference apps, among others. I have also helped develop a few big-name apps in the store that I cannot publicly take credit for.

Coming back on track with MS Tech Affiliate, they recently introduced a sweepstakes competition where any Windows Phone and Windows 8 developer can enter to win $1,000, $500 or $250 cash prize every month when they enter the sweepstakes at http://aka.ms/PaWa

Given my experience writing apps and helping developers already, this was an easy way for me to push developers to create new apps and enter them in the sweepstakes. Developers had a fun time learning and building apps for Windows Phone and Windows 8, and entering them in the sweepstakes. And what do you know, 4 individual developers whom I've helped develop apps have already been chosen as big winners as part of this sweepstakes.

I have received countless emails asking for help and then thanking me after their app gets published in the store. This is gratitude enough; the feeling of being able to help someone become a published app developer in itself is great, however, when you see the developer gaining success and popularity with his/her app, that feels even better :)

So what are you waiting for, enter all your Windows Phone and Windows 8 apps in the sweepstakes at http://aka.ms/PaWa and don't forget to ask for help when needed.

Sincerely,


Paras Wadehra
Nokia Developer Ambassador
INETA Community Champion
Microsoft Windows Phone Champ

Monday, September 16, 2013

September Giveaways

We have some awesome promotions for you for the month of September that you are sure to like.

First up, the September Lumia Blowout. This month we are giving away "your choice of phone"  - yes, that is right, if you win, you pick the phone you want, out of Nokia Lumia 920, 925, 928 or 1020 - we have them all!

Follow this link http://richarddunbar.blogspot.com/2013/09/september-lumia-blowout.html and read the instructions to enter the giveaway carefully.


Next up, I am giving away Nokia Premium Developer Program memberships to the active Windows Phone developers among you (if I have not already given you one, that is). Active Windows Phone developer being defined as someone who has either launched a new app or updated an existing app withing the last 180 days. We will use Sep-30 as the "being active date" for this promotion, which means you must have published a new WP app or updated an existing WP app on or after Apr-4, 2013. There are limited quantities available, on a first come first serve basis.

Send me the following information in an email with subject "NPDP Giveaway" to "ext-Paras.Wadehra AT nokia DOT com":
1. Full Name
2. Email address (this is the one we can reach you at, one you actually check daily)
3. The link to your qualifying application in the Windows Phone Store.
4. DVLUP.com username (If you haven't registered yet, go do it, it's free and you'll be glad you did)
5. Your Windows Dev Center Publisher GUID (it's on your dev center dashboard)
6. Your location: City, State


There will be another drawing where you can enter to win up to $1,000 cash money to use however you like. There will be 3 prizes of $1000, $500 and $250 for the month of September. Just go here and enter with your Windows Phone and Windows 8 apps - http://aka.ms/PaWa - don't forget to enter all your apps, the more apps you have the more chances to win. I have a total of 3 developers who have already won this prize in the past months, 2 of them won $1000, and 1 won $500.

So what are you waiting for, enter all the promotions today!


INETA Community Champion
Microsoft Windows Phone Champ

* The September Lumia Blowout and the NPDP giveaway are limited to residents of Oregon, Nevada, Idaho and Northern California.

Friday, July 26, 2013

Want to win a Windows Phone 8 device?


Alright everyone,

It's about time I did another awesome Nokia Lumia Windows Phone giveaway.

This time I am doing a simple drawing and giving away a brand new AWESOME Nokia Lumia 620 Windows Phone 8!!!

All you need to do is send the following info to me in an email...

1) Your Windows Phone Publisher Name
2) Your DVLUP.com username
3) Your City and State

That’s it; told you it was simple :) My email address is "ext-Paras.Wadehra AT nokia DOT com"
 
Act fast because the deadline to send the info to qualify for the drawing is midnight Jul-31 Pacific Time. I am going to do the drawing for the phone soon after, after validating all the entries …  Don’t miss your chance!!!

Also, keep watching my blog at http://ParasWadehra.blogspot.com and follow me on twitter @ParasWadehra for some really great, fun and easy ways to win some insanely cool things!

Note that this drawing is eligible to all Windows Phone devs residing in US and Canada, so please spread the word, tweet it, facebook it, share it, email it, do whatever you can to let your friends in on the goodness too!
 
Cheers,
Paras Wadehra
Nokia Developer Ambassador
INETA Community Champion
Twitter: @ParasWadehra
Find my apps at http://bit.ly/MyWPApps

Friday, June 7, 2013

Make an Awesome Marketing Video for Your App

Nokia has gone to great lengths to make it easy for developers to create promotional materials for their Windows Phone apps via their Marketing in a Box offering, including marketing videos, banners, facebook page and website among others.

Steps to make your own promotional marketing video


  1. Go to the Marketing Toolkit main page (you’ll need to be signed in)
  2. Select the checkbox under “Promotional Video”
  3. Paste in the Store URL to your app
  4. Select the platform of your choice (I chose Lumia 920)
  5. Select a language
  6. Click “Continue”
On the next page:
  1. Select a category
  2. Make sure the app name is correct
  3. Click “Continue”
On the next page, you can choose the words that get displayed during the video, choose the adjectives that best describe your app’s user experience.
  1. Select all three words for your app
  2. Select the screenshot you want to be in the video
  3. Choose the music you want in the video
  4. Click “Preview Video”
You’ll be brought to the preview page. If you want to change something, you can go back and alter your choices.
  1. If you like the video, click “Continue”
  2. Click “Create Video”
You’re almost done, the next steps involve signing into your youtube account and wait for the video’s full rendering and auto-upload to your online profile.

Congratulations, you now have a great looking video to promote your app.

Cheers,
Paras Wadehra
Nokia Developer Ambassador
INETA Community Champion
Twitter: @ParasWadehra

Wednesday, May 1, 2013

APPortunity Win

So I have been promoting the APPortunity Sweepstakes by Microsoft for a while now and have had lots of developers enter the sweepstakes and today one of the developers who entered the sweepstakes via my link won the Grand Prize of a cool $1,000 in cash for the month of April! Yes, you heard that right, a cool $1,000 in cash; now that is sure to put a smile on the winner's face :)

So head on over today to http://www.mstechaffiliate.com/members/paraswadehra and enter to win a $1,000 for the month of May, and you can also enter again in June!

You have 3 chances to win every month, a grand prize of $1,000, 2nd prize of $500 and 3rd prize of $250 - that means you still have 6 chances to win between May and June.

Cheers,
Paras Wadehra
Twitter: @ParasWadehra
FB: http://www.facebook.com/WindowsPhoneDeveloper
My apps: http://bit.ly/MyWPApps