|
by: Michael C |
last post by:
eg
void DoIt()
{
int i = FromString("1");
double d = FromString("1.1");
}
int FromString(string SomeValue)
{
|
by: Just D. |
last post by:
All,
Do we have a simple way to Create an object on the fly knowing just an
object type? The usual design-time way is to write a code something like
this:
CObjectType obj = new CObjectType();
That's simple. But to create any object knowing its object type on the fly
is looking like a problem. I'll try to explain the idea.
|
by: JohnR |
last post by:
I'm trying to find a way to create a variable of a given type at runtime
where I won't know the type until it actually executes. For example,
dim x as object = "hi"
x is declared as an object but x.gettype returns 'string', so it knows it
contains a string.
If I want to create a variable "y" as the same type that variable x contains...
|
by: John Grandy |
last post by:
My ASP.NET Web Service project has a Web Method that returns an array filled
with instances of a custom class.
The custom class is defined in a Class Library that is included in the
web-service project.
The same class lib is included in the ASP.NET Web Application that calls the
web-method
I can successfully call the web-method with
|
by: Jigar.Patel |
last post by:
I have simple remoting server exposing following simple method. When I try to
add webreference to this server in another project,
it gives me following error:
Custom tool error: Unable to import WebService/Schema. Unable to import
binding 'MyRemoteObjectBinding' from namespace...
|
|
by: Harold Howe |
last post by:
I am running into a situation where the compiler complains that it
cannot infer the type parameters of a generic method when one of the
function arguments is an anonymous method.
Here is a complete code example:
//-----------------------------
using System;
using System.Collections.Generic;
|
by: mfc |
last post by:
How do i get the type info in a static method?
for instance in the code below is it possible for the Method to get the type
to know what type was used to call Method?
thanks
class C {
|
by: Alexander Widera |
last post by:
hi,
is it possible to return an object of an unknown (but not really unknown)
type with an method?
i have the following situation:
- a variable (A) of the type "object" which contains the object
- a variable (B) of the type "Type" which contains the type of the object in
(A) (A should be of the type B)
- a method which should return the...
|
by: Steve Richter |
last post by:
in a generic class, can I code the class so that I can call a static
method of the generic class T?
In the ConvertFrom method of the generic TypeConvert class I want to
write, I have a call to the static Parse method of the conversion
class.
if (InValue is string)
return T.Parse((string)InValue);
else
return base.ConvertFrom(context,...
|
by: =?Utf-8?B?TW9ydGVuIFdlbm5ldmlrIFtDIyBNVlBd?= |
last post by:
"Anders Borum" wrote:
Hi Anders,
I'm afraid the GetMethod() does not currently support filtering on generic
parameters so you will have to loop through the existing methods using
GetMethods()
MethodInfo methods = t.GetMethods();
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
|