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;


bool value;
if ("dit" == "dat") 
    value = true;
   value = false;
Вула Чăвашла

VulaCV - Чăвашла вулаттаракан сайт

Discovering SharePoint

And going crazy doing it

Bram de Jager - Architect, Speaker, Author

Microsoft 365, SharePoint and Azure

SharePoint Dragons

Nikander & Margriet on SharePoint

Cameron Dwyer

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


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

Aryan Nava

DevOps, Cloud and Blockchain Consultant


SharePoint for everyone


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

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint


Mostly what I know about SharePoint - CommunicoCuspis


SharePoint på ren svenska