Фунция для минимизации каскадных стилей на VB.NET:
Public Shared Function RemoveWhiteSpaceFromStylesheets(body As String) As String
body = Regex.Replace(body, "[a-zA-Z]+#", "#")
body = Regex.Replace(body, "[nr]+s*", String.Empty)
body = Regex.Replace(body, "s+", " ")
body = Regex.Replace(body, "s?([:,;{}])s?", "$1")
body = body.Replace(";}", "}")
body = Regex.Replace(body, "([s:]0)(px|pt|%|em)", "$1")
body = Regex.Replace(body, "/*[dD]*?*/", String.Empty)
Return body
End Function