If you always want the loop to execute at least once. It’s not common, but I do use it from time to time. One case where you might want to use it is trying to access a resource that could require a retry, e.g.
do { try to access resource... put up message box with retry option } while (user says retry);
Related Posts:
- What is C# equivalent of
- Algorithms in O(n^2) vs O(n) [duplicate]
- Visual Studio /**/ comment shortcut?
- C# equivalent of C++ vector, with contiguous memory?
- how to convert C# to C++
- Is dependency injection useful in C++
- Is dependency injection useful in C++
- Where to place native DLL to use Pocket PC emulator?
- Critical error detected c0000374 – C++ dll returns pointer off allocated memory to C#
- C++ performance vs. Java/C#
- How do I generate a random int number?
- What is the difference between float and double?
- An existing connection was forcibly closed by the remote host
- Unexplained crashes related to ntdll.dll
- I am getting Failed to load resource: net::ERR_BLOCKED_BY_CLIENT with Google chrome
- What is parsing?
- How to fix “HTTP Error 400. The size of the request headers is too long” error from azure cloud services?
- Could not load file or assembly or one of its dependencies
- Adding values to a C# array
- LINQ’s Distinct() on a particular property
- Priority queue in .Net
- What is the difference between int, Int16, Int32 and Int64?
- Adding values to a C# array
- How can I add ” character to a multi line string declaration in C#?
- Input string was not in a correct format
- The request was aborted: Could not create SSL/TLS secure channel
- What is use of c_str function In c++
- Unable to connect to web server ‘IIS Express’
- Twilio TwilioRestClient does not contain a definition for SendSmsMessage
- How to convert byte array to string
- ASP.NET Core Dependency Injection error: Unable to resolve service for type while attempting to activate
- Is there a function to copy an array in C/C++?
- Compiler Error Message: The compiler failed with error code -2146232576
- Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details
- A generic error occurred in GDI+, JPEG Image to MemoryStream
- “Could not find a part of the path” error message
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for jquery
- Examples of good gotos in C or C++
- What does the %= operator do? [duplicate]
- What does vary:accept-encoding mean?
- what is this oleaut32.dll?
- Why not use Html.EditorForModel()
- Where can I find System.Web.Helpers, System.Web.WebPages, and System.Web.Razor?
- How to Use TextureBrush for painting an Image
- Can’t use System.Windows.Forms
- How to use the “Using” statement in ASP.net razor webpages?
- Where can I find the assembly System.Web.Extensions dll?
- Regex for numbers only
- There is no argument given that corresponds to the required formal parameter – .NET Error
- How do I remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning?
- Is there an exponent operator in C#?
- How can I export data to an Excel file
- Could not establish trust relationship for SSL/TLS secure channel — SOAP
- How to convert an Stream into a byte[] in C#?
- Merge two (or more) lists into one, in C# .NET
- Debug vs Release in CMake
- Why should I use IHttpActionResult instead of HttpResponseMessage?
- Convert integer to binary in C#
- HTML.ActionLink method
- Thread-safe List
property - Styles.Render in MVC4
- Exception from HRESULT: 0x800A03EC Error
- num1 >= 0x80 – What is 0x80?
- There is already an open DataReader associated with this Command which must be closed first
- Merging two arrays in .NET
- C# syntax to initialize custom class/objects through constructor params in array?
- Unable to connect to any of the specified mysql hosts. C# MySQL
- String was not recognized as a valid DateTime ” format dd/MM/yyyy”
- Checking if a string array contains a value, and if so, getting its position
- Substring index and length must refer to a location within the string
- Difference between Method and Function?
- How to pass data (and references) between scenes in Unity
- Constructor of an abstract class in C#
- Catch multiple exceptions at once?
- How to delete a file after checking whether it exists
- c# Show Windows Form
- What is the source of the data for the ProgramFiles, ProgramW6432Dir, ProgramFilesDir (x86), CommonProgramFiles environment variables?
- Equivalent of console.log in C#
- How to get the URL of the current page in C#
- How to use a Do-while loop that continuously prompts a user?
- C# Debug – cannot start debugging because the debug target is missing
- ‘namespace’ but is used like a ‘type’
- How to properly make a http web GET request
- Strip double quotes from a string in .NET
- Simulating Key Press C#
- No overload for method ” takes 1 argument
- Best way to “push” into C# array
- Linker error: “linker input file unused because linking not done”, undefined reference to a function in that file
- Playing a MP3 file in a WinForm application
- The server tag is not well formed error
- How to solve Operator ‘!=’ cannot be applied to operands of type ‘T’ and ‘T’
- Best way to randomize an array with .NET
- Encrypt and decrypt a string in C#?
- Key Value Pair List
- Using .Select and .Where in a single LINQ statement
- How to resize an Image C#
- Unrecognized escape sequence for path string containing backslashes
- C# Dictionary get item by index
- A field initializer cannot reference the nonstatic field, method, or property