by
0
5
142
0
Popular
Easy-to-find
Specified
Refined
OpenSource
Popularity: 612908th place

Published on:

InputName0preloadArea
InputType0string
LanguageCSharp
LicenseMIT_X11
MethodNamePreloadAreaFromString
OSWindows
OutputTypePreloadArea

PreloadAreaFromString: Converts a string to a PreloadArea

<summary>
Converts a string to a PreloadArea
</summary>
<param name="preloadArea">the string to convert</param>
<returns>The converted PreloadArea</returns>
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/286121/PreloadAreaFromString--Converts-a-string?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
/// <summary> /// Converts a string to a PreloadArea /// </summary> /// <param name="preloadArea">the string to convert</param> /// <returns>The converted PreloadArea</returns> public static PreloadArea PreloadAreaFromString(string preloadArea) { if (preloadArea.EndsWith("None")) { return PreloadArea.None; } else if (preloadArea.EndsWith("Small")) { return PreloadArea.Small; } else if (preloadArea.EndsWith("Medium")) { return PreloadArea.Medium; } else { return PreloadArea.Large; } }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus