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

  • Home
  • SEARCH
  • 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 8792635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:00:27+00:00 2026-06-13T23:00:27+00:00

I have the following code //^process a aquery and return DataTable DataTable d t=

  • 0

I have the following code

//^process a aquery and return DataTable
DataTable d t= dbConnect.ProcessQuery(strquery);
Type t = dt.Columns[0].DataType.GetType();

How to create objects of type t that will receive the dt[0][..] ?

I know that dt.Rows[][] will be of type t

I need to create anagrammatically variables of type t

  • 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-06-13T23:00:28+00:00Added an answer on June 13, 2026 at 11:00 pm

    First step is to retrieve the actual type you want to create. Most probably, the name of the type is stored in the database as a String. So you call

    var typeName = "System.Int32";
    var type = System.Type.GetType(typeName);
    

    Now that you have the actual type you want to instantiate, call

    var obj = System.Activator.CreateInstance(type);
    

    In most cases you would have a common base interface for all types that you would ever use in each scenario:

    var i = (IFormattable)obj;
    

    Now you can call the methods on the interface and they will be executed on the actual type.

    Console.WriteLine(i.ToString("0", System.Globalization.CultureInfo.InvariantCulture));
    

    Documentation: http://msdn.microsoft.com/en-us/library/wccyzw83.aspx

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

Sidebar

Related Questions

I currently have the following code: <form action=process.php method=POST> <fieldset class=form-search> <input type=text class=input-text
i have used following code to repeat a process creation/close iteratively dim vProcessInfo as
I have the following code: ifstream initFile; initFile.open(D:\\InitTLM.csv); if(initFile.is_open()) { // Process file }
I have a Spring Batch process which has following kind of code. <step id=step1
I have following code: private void fileSystemWatcher_Changed(object sender, System.IO.FileSystemEventArgs e) { System.Diagnostics.Process execute =
I have the following code to run a process on a remote machine from
I have the following code <a href=process.html>cholera</a> I want to pass cholera to process.html
I have the following code: ProcessStartInfo si = new ProcessStartInfo(./Resources/pdftk.exe, executionstring); Process myproc =
Basically I have the following code: import multiprocessing import time class MyProcess(multiprocessing.Process): def __init__(self,
I have the following code: private void Process(string path) { using (FileStream fs =

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.