Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7631765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:26:15+00:00 2026-05-31T06:26:15+00:00

In certain cases I need to determine a type and I just don’t know

  • 0

In certain cases I need to determine a type and I just don’t know what the type is. For example, DevExpress plugins request a type when getting data.

e.Data.GetDataPresent(typeof(DataRow))

I set the data source as a DataTable. I don’t know if the data present is actually a String, DataRow, DataColumn or other.

Is there any way to determine this type without having to hack at all the possibilties one by one in the debugger/Immediate window?

UPDATE
In this case it’s a winform app event

private void grid_VDragOver(object sender, System.Windows.Forms.DragEventArgs e)
        {
            if (e.Data.GetDataPresent(typeof(DataColumn)))//DataColumn is just a guess..no idea
                e.Effect = DragDropEffects.Move;
            else
                e.Effect = DragDropEffects.None;
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:26:16+00:00Added an answer on May 31, 2026 at 6:26 am

    You can use object.GetType() – all objects implement it, so you can simply use that:

    e.Data.GetDataPresent(variable.GetType())
    

    Update:

    With the revision (drag drop data accessible only through IDataObject and no variable), this answer is of limited use to the OP. I will keep it here for those whom it might help that do not have these exact constraints.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In certain areas in my application I need data from several tables in the
In certain cases - especially when an exception escapes a destructor during stack unwinding
On certain error cases ATL invokes AtlThrow() which is implemented as ATL::AtlThrowImpl() which in
Certain list comprehensions don't work properly when I embed IPython 0.10 as per the
In certain cases I want my function to simply crash and my app to
We are getting the following error on a certain database occasionally under moderate load.
I need to get the value of the content attribute of a certain meta
I am still trying to wrap my head around certain cases in REST where
I'm using a scripting functoid in a BizTalk map. In a certain case, I
In the case when I want to check, if a certain entry in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.