Unity – How to stop Play Mode in case of infinite loop?

I just got into this situation: accidental infinite loop, stuck in play mode on a scene with unsaved work, Unity unresponsive. But I was lucky enough to have Monodevelop open, even though I was mainly using Sublime for scripting. I pressed the button to start debugging near the top left of the Monodevelop window, then … Read more

Remove punctuation from string with Regex

First, please read here for information on regular expressions. It’s worth learning. You can use this: Which means: In the end it reads “replace any character that is not a word character or a space character with nothing.”

Format of the initialization string does not conform to specification starting at index 0

228 Check your connection string. If you need help with it check Connection Strings, which has a list of commonly used ones. Commonly used Connection Strings: SQL Server 2012 Standard Security Trusted Connection Connection to a SQL Server instance The server/instance name syntax used in the server option is the same for all SQL Server connection … Read more

Differences between SFTP and “FTP over SSH”

Here is the difference: SFTP (SSH file transfer protocol) is a protocol that provides file transfer and manipulation capabilities. It can work over any reliable data stream, but is typically used with SSH “FTP over SSH” uses the regular old FTP protocol, but an SSH tunnel is placed between client and server. You probably won’t find libraries for … Read more

Convert string to decimal, keeping fractions

Hmm… I can’t reproduce this: Are you sure it’s not some other part of your code normalizing the decimal value later? Just in case it’s cultural issues, try this version which shouldn’t depend on your locale at all:

How to implement a property in an interface

In the interface, you specify the property: In the implementing class, you need to implement it: This looks similar, but it is something completely different. In the interface, there is no code. You just specify that there is a property with a getter and a setter, whatever they will do. In the class, you actually … Read more

Why is access to the path denied?

According to File.Delete Method… An UnauthorizedAccessException means one of 4 things: The caller does not have the required permission. The file is an executable file that is in use. Path is a directory. Path specified a read-only file.

Categories c#