Format:
Recent snippets for: Robert Andersson
int intValue = 1512; string stringValue = intValue.ToString("#,#", CultureInfo.GetCultureInfo(Thread.CurrentThread.CurrentCulture.Name)); /* Result in US English (en-US) will be 1,512 Result in Swedish (sv-SE) will be 1 512 */
58 Views
no comments
/// <summary> /// Return all properties from a type up to a specified base type in the inheritance hierarchy /// </summary> /// <param name="type">Type that will be examined</param> /// <param name="baseType">Where to stop in the inheritance hierarchy. Must be a type that first parameter inherits from /// </param> /// <returns>A list of all found properties</returns> public static List<PropertyInfo> GetAllProperties(Type type, Type baseType) { List<PropertyInfo> properties = new List<PropertyInfo>();
117 Views
no comments
/// <summary> /// Return all properties from a type up to a specified base type in the inheritance hierarchy /// </summary> /// <param name="type">Type that will be examined</param> /// <param name="baseType">Where to stop in the inheritance hierarchy. Must be a type that first parameter inherits from /// </param> /// <returns>A list of all found properties</returns> public static List<PropertyInfo> GetAllProperties(Type type, Type baseType) { List<PropertyInfo> properties = new List<PropertyInfo>();
71 Views
no comments
/// <summary> /// Creates a string list that contains the hierrarchy leading to the current page /// </summary> /// <param name="currentPage"></param> /// <param name="ReplaceStartWithLangCode"></param> /// <param name="ReverseSort"></param> /// <returns></returns> public static List<string> GetBreadCrumb(PageData currentPage, bool ReplaceStartWithLangCode, bool ReverseSort) { if (currentPage != null)
153 Views
no comments
/// <summary> /// Get all pages from the LinkItemCollection property /// </summary> /// <returns>PageDataCollection</returns> public PageDataCollection GetLinkCollectionPages(string propertyName) { PageDataCollection pages = new PageDataCollection(); LinkItemCollection links = CurrentPage[propertyName] != null ? CurrentPage.Property[propertyName].Value as LinkItemCollection : null; if (links != null) {
178 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
