|
As of 2024 this can be useful.
[GeneratedRegex(@", Version=\d+.\d+.\d+.\d+|, Culture=\w+|, PublicKeyToken=\w+")]
private static partial Regex LesserRegex();
private static readonly Regex lesser = LesserRegex();
private static string AssemblyLessQualifiedName(Type? t)
{
var n = t?.AssemblyQualifiedName;
if (n != null)
return lesser.Replace(n, string.Empty);
else
return string.Empty;
}
example a type of
Dictionary<string,object> results in:
System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib],[System.Object, System.Private.CoreLib]], System.Private.CoreLib"
sometimes I think, therefore sometimes I am
|
|
|
|
|
As it is about to known as off-topic, I deleted it.
|
|
|
|
|
What about more generally? i.e. "typing dark letters on a light background"? If I change the title then your alternate is off topic
|
|
|
|
|
Reason for my vote of 2
Just change the tip subject as 'String replacing using Regex' , which could give better meaning to your tip
|
|
|
|
|
Reason for my vote of 1
Too complicated
|
|
|
|