Well, I agree that the use case described above is not something that I would use. However, I do not agree when it comes to the fact that it is useless. For example, we use enumerations to classify string values โโfor machine learning modules. We write code at runtime to use it at runtime, and grouping enumerations is much faster than grouping and parsing strings. There is nothing good when using strings in great qualities. They are problematic when comparing, allocating memory, garbage collection, grouping, sorting, too many bytes.
Databases that manage large amounts of data will generate a hash of the string and store it, then compare the hash of the strings (not unique, but the number) and the string in a single expression, forcing TSQL to use a more specific index in the hash field. to narrow down your search and then compare string values โโto make sure the correct value is being used. in TSQL this can be done like this:
SELECT * FROM Production.Product WHERE CHECKSUM(N'Bearing Ball') = cs_Pname AND Name = N'Bearing Ball'; GO
but on .net we keep thinking that string comparison is the way to go.
It makes no sense for me to drop my code here, since it is proprietary, but there are many good examples, an article by Bob Dane shows line by line how this can be done, and is located here
. A fragment of his decision is as follows:
using System; using System.Reflection; using System.IO; namespace RemoteUser { public class RemoteUserClass { public RemoteUserClass() {
You can use the System.Reflection.Emit namespace for many things, you can create a class that creates a license key for it. You can also write code, and code writing and updating code is the future.
PPann
source share