|
by: Eric |
last post by:
I need to do the following but it doesn't compile
if(typeof(listBox1.Items) == typeof(string)){
return;
}
typeof(listBox1.Items) doesn't work at all. My listBox has 2 types of items in them and I need to know what kind of item a user clicked on so I can use it for drag and drop
|
by: ichor |
last post by:
hi
what is the use of the typeof keyword , and how does it differ from the
GetType method. i found the GetType method useful but i fail to understand
the use of the typeof method.
i have tried out a very simple example which i made up myself.
Employee e = new Employee();
ContractEmp ec =new ContractEmp();
MessageBox.Show(typeof(Employee).ToString());
|
by: Mark Miller |
last post by:
I am using Reflection.Emit to dynamically build a class. A method of the
class to be built requires a Parameter of type "Type". But I don't know how
to use Emit to pass a call of "typeof()" to the method.
The method could look like this:
public void myDynamicMethod(Type type){
//.....do something with the Type passed in.......
}
|
by: Alberto |
last post by:
Can somebody tell me why this typeof doesn't work?
foreach (Control myControl in Controls)
if (typeof(myControl) == "TextBox")
((TextBox)myControl).Text = string.Empty;
Thank you very much
|
by: Brien King |
last post by:
Ok, I have three classes (The example here is extremely simplified to
illustrate the problem) like this:
Public Class A
Public Sub DoSomething(ByVal myClass)
If TypeOf myClass IS A Then
'
' Never Enters here....
'
End If
|
|
by: Jason Kendall |
last post by:
Why doesn't the new "IsNot" operator work in conjunction with
'Typeof'?
|
by: Andrew Robinson |
last post by:
I am guessing there is a simple solution but given a type T, how can I check
for nullability?
how can I accomplish the following?
bool nullable = typeof(int).IsNullable; // false
bool nullable = typeof(int?).IsNullable; // true
bool nullable = typeof(string).IsNullable; // true
Thanks for any help.
|
by: EManning |
last post by:
Using A2003. I've got an option group that has a number of check
boxes. I have coding to clear the option group if the user wishes to
cancel their choice. This coding also clears the rest of the controls
on the form. Snippet of the coding:
<..snipped..>
ElseIf TypeOf oCtrl Is CheckBox Then
oCtrl.Value = False
<..snipped..>
ElseIf TypeOf oCtrl Is OptionGroup Then
|
by: effendi |
last post by:
I am testting the following code in firefox
function fDHTMLPopulateFields(displayValuesArray, displayOrderArray)
{
var i,
currentElement,
displayFieldID,
currentChild,
nDisplayValues = displayValuesArray.length;
for (i=0; i<nDisplayValues; i++) {
|
by: rkk |
last post by:
Hi,
Is there an equivalent typeof macro/method to determine the type of a
variable in runtime & most importantly that works well with most known
C compilers?
gcc compiler supports typeof() macro, but the same code is not getting
compiled in solaris forte compiler and in microsoft VS 2003 compiler. I
tried something like below:
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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.
|