大约有 780 项符合查询结果(耗时:0.0358秒) [XML]
Catch multiple exceptions at once?
...d an exception filter to do it and C# doesn't expose that feature of MSIL. VB.NET does have this capability though, e.g.
Catch ex As Exception When TypeOf ex Is FormatException OrElse TypeOf ex Is OverflowException
What you could do is use an anonymous function to encapsulate your on-error code, ...
How do you keep user.config settings across different assembly versions in .net?
...ere, making it obsolete. A sample obsolete setting would look like this in VB.NET (can easily be translated to C#):
<UserScopedSetting(),
DebuggerNonUserCode(),
DefaultSettingValue(""),
Obsolete("Do not use this property for any purpose. Use YOUR_NEW_SETTING_NAME instead."),
NoSettingsVersionUpg...
How can I generate UUID in C#
...]
static extern int UuidCreateSequential(out Guid guid);
VB Signature:
Declare Function UuidCreateSequential Lib "rpcrt4.dll" (ByRef id As Guid) As Integer
User-Defined Types:
None.
Notes:
Microsoft changed the UuidCreate function so it no...
C++ performance vs. Java/C#
...ompiler will simply easily outperform the JIT.
Of course, C# (or Java, or VB) is usually faster to produce viable and robust solution than is C++ (if only because C++ has complex semantics, and C++ standard library, while interesting and powerful, is quite poor when compared with the full scope of ...
In C# what is the difference between a destructor and a Finalize method in a class?
...d
by the ~ sign. Like-
Class MyClass
{
~MyClass()
{
.....
}
}
In VB.NET, destructors are implemented by overriding the Finalize
method of the System.Object class.
Dispose
These are just like any other methods in the class and can be called
explicitly but they have a special purp...
X-Frame-Options Allow-From multiple domains
... answered Jan 24 '14 at 9:57
vbovbo
13.3k11 gold badge2222 silver badges3232 bronze badges
...
Create Generic method constraining T to an Enum
... Generics are available since .NET 2.0. Hence they are available in vb 2005 as well.
– Vivek
Jun 1 '09 at 17:07
47
...
If strings are immutable in .NET, then why does Substring take O(n) time?
...For example, my team writes programs that do on-the-fly analysis of C# and VB code as you type it. Some of those code files are enormous and thus we cannot be doing O(n) string manipulation to extract substrings or insert or delete characters. We have built a bunch of persistent immutable data struc...
What is the difference between a reference type and value type in c#?
...of mine from a different forum, about two years ago. While the language is vb.net (as opposed to C#), the Value Type vs. Reference type concepts are uniform throughout .net, and the examples still hold.
It is also important to remember that within .net, ALL types technically derive from the base t...
How can you use an object's property in a double-quoted string?
...rmatting". Since Powershell is inextricably bound to .NET for which C# and VB.NET are the primary programming languages, the terms "string interpolation" and "interpolated string" (and anything similar) should be applied only to the new $ prepended strings found in those languages (C# 6 and VB.NET 1...