CHUVASH.eu

CHunky Universe of Vigourous Astonishing SHarepoint :)

Tag Archives: allmän programmering

Singleton vs static

Have you wondered what to use a singleton object  or a class with static methods. Well, here is an awesome comparision of these techniques. Static methods and classes are easy to use, but you can’t them as objects, implement interfaces and have constructors with parameters.

Rensa text från html-taggar

Ett bra exempel finns här.

using System.Text.RegularExpressions;
...
const string HTML_TAG_PATTERN = "<.*?>";

static string StripHTML (string inputString)
{
return Regex.Replace(inputString, HTML_TAG_PATTERN, string.Empty);
}

ForEach-metod i List

En intressant variant av foreach är ForEach-metoden i List.

Titta på det lilla exemplet:

private static void SavePlacesToDB(SQLiteConnection cnn, 
                                     List<dynamic> places)
{
    places.ForEach(obj => SavePlaceToDB(obj, cnn));
}

Här används även det nya objektet dynamic som har kommit i Visual Studio 2010, samt en lambda expression (=>).

kort variant av if-else

Inget speciellt egentligen med detta men vill skriva upp det här för att jag brukar glömma det. Det är samma syntax som i många andra språk:

 

bool value = "dit" == "dat" ? true : false;

Motsvarar:

bool value;
if ("dit" == "dat") 
{
    value = true;
}
else 
{
   value = false;
}
Discovering SharePoint

And having fun doing it

Bram de Jager talking Office 365, SharePoint and Azure

My view and thoughts on Productivity and more.

My programming life

and everything in between

SharePoint Development Lab by @avishnyakov

It is a good place to share some SharePoint stories and development practices.

SharePoint Dragons

Nikander & Margriet on SharePoint

RealActivity - Real-time and trustworthy

Blog site of founder, RealActivty - Paul J. Swider

Mai Omar Desouki - Avid SharePointer

Egyptian & Vodafoner - Senior SharePoint Consultant

Cameron Dwyer | Office 365, SharePoint, Outlook, OnePlace Solutions

Office 365, SharePoint, OnePlace Solutions & Life's Other Little Wonders

paul.tavares

Me and My doings!

Share SharePoint Points!!

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

SPJoel

SharePoint for everyone

SharePointRyan

Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode, ya mama

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint

blksthl

Mostly what I know about SharePoint - CommunicoCuspis