bookmark_borderWPF Converter: CaseConverter

Case Converter was made when I wanted the text to display in a WPF UI in upper case. Probably not the best class name, but anyway. To get the code and install read on.

Continue reading “WPF Converter: CaseConverter”

Sytone

I’m a principal engineer working at Microsoft. I have run and supported services for over twenty years and worked in multiple countries. I love working with passionate people and new technology.

bookmark_borderGetting the Central Admin URL for a Farm in SharePoint

Toy CarI recently needed to get the Url of the CA for a SharePoint farm, after a bit of hunting in the API it was tracked down under the SPAdministrationWebApplication object.

C#

[code lang=”csharp”]
SPAdministrationWebApplication caWebApp = Microsoft.SharePoint.Administration.SPAdministrationWebApplication.Local;
var url = caWebApp.Sites[0].Url;
[/code]

PowerShell

[code lang=”ps”]
$caWebApp = [Microsoft.SharePoint.Administration.SPAdministrationWebApplication]::Local
$caWebApp.Sites[0].Url
[/code]

Sytone

I’m a principal engineer working at Microsoft. I have run and supported services for over twenty years and worked in multiple countries. I love working with passionate people and new technology.

bookmark_borderWhen is true not true?

When you look at true stored in the .Net framework.

While playing with Pex I found out a interesting fact that the bool is a byte in the MSIL. Which means that a bool could be euqal to anything on the byte range… Now this would require you to go out of your way and create unsafe code blocks to do this. Why you would do this… No ideas 🙂

Its marked as a no-fix which is not supprising as I would not fix it either becase as they say, if you know about this and you use it then you are on your own..

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=455553&wa=wsignin1.0

http://blog.dotnetwiki.org/2009/05/29/TamingThePexBeastWellbehavedEnumsMultidimensionalArraysAndBooleans.aspx

Sytone

I’m a principal engineer working at Microsoft. I have run and supported services for over twenty years and worked in multiple countries. I love working with passionate people and new technology.