I am having 4 different datatypes in my array list. These are specific to my application(not common data types) Say for example Array abc has contain 10 values with Datatype1 - 4 values, Datatype2 - 2 values, Datatype3 - 2 values, Datatype4 - 2 values. ? I need to extract Datatype1 alone(i.e 4 values). How can I do that
How can I extract only one datatype values from a mixed datatype array?
91 Views Asked by Saran Mohan At
1
There are 1 best solutions below
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in ARRAYS
- Two different numbers in an array which their sum equals to a given value
- how to fill out the table with next values in array with one button
- How to sort a multi-dimensional array by the second array in descending order?
- Looping over defined array elements in Fortran
- Array appending after each onclick and loop in javascript
- PHP : How can I check Array in array?
- store numpy array in mysql
- Java Assign a Value to an array cell
- Saving FileSystemInfo Array to File
- Notice: Undefined offset: 1, but there is such offset
- How can I determine the index of the same set of characters between two strings that are of different lengths?
- Caused by: java.lang.ArrayIndexOutOfBoundsException: length=8; index=8
- Pull out first occurrences from array
- How to read a file then store to array and then print?
- C++ won't read in scientific notation data from a .txt file
Related Questions in MULTIDIMENSIONAL-ARRAY
- How to sort a multi-dimensional array by the second array in descending order?
- C programming: Create and write 2D array of files as function
- Working with multiple array in PHP
- PHP multidimensional array, average of duplicate values
- Multiple parameters in a Dictionary
- navigate through multidimensional PHP array by relative path
- How to double values in 2d array? C++
- Multidimensional Array view defined line
- .NET Array with Multiple Data Types
- Multidimensional Array modify values
- Rearrange multidimensional array from other array
- Callback set_message not working with multidimensional array post
- Javascript push multidimensional array only checked checkboxes
- Program crash while trying to print a bidimensional array
- How to extract all 2nd level values (leaf nodes) from a 2-dimensional array and join with commas?
Related Questions in ELEMENT
- JAVA RMI get pass ArrayList element
- How to ensure that a List in C# always has a specific element?
- How to modify multiple elements of a block with BEM CSS
- Protractor not able to count links in a list (li)
- jQuery button to show/hide multiple divs with same id
- Drag and drop for switching divs
- Prolog- Returning elements from facts
- All HTML5 structural elements?
- How to verifyElement to the specific span ID element
- Element blue not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
- C code Count elements in array that are not null
- What is the difference between a ElementTree and an Element? (python xml)
- vector/array bounds check only when a define is declared
- Adding View Details Button with JS
- external jquery mobile not implementing jquery mobile style
Related Questions in CUSTOM-DATA-TYPE
- Function to calculate portions and instance of a class in haskell
- Cassandra custom data type
- Spyder Variable explorer how to show custom data types?
- How to initialize an array of custom data type with more than 1 member variables?
- Haskell accessing fields in custom data types
- How to make your own data type like int, long in C?
- How can I extract only one datatype values from a mixed datatype array?
- javascript - custom data type - what do i need / what should i learn about
- How to import a function and a custom type into DataStage?
- Create custom Tensorflow dataset .tiff files
- How to avoid Duplicates of a combination of columns in SharePoint Lists
- Handling custom restrictions/exceptions in a bean class?
- Getting a type mismatch error with the Haskell zipWith function
- SwiftUI 1.0: Save custom Datatype in CoreData
- How to create a c++ type of a list of valid values
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can use the
OfType<TResult>()extension method to filter yourArrayListbased on a specific type.I'm assuming based on the language in your question that you're using an
ArrayList, but this extension method will work on anything that implementsIEnumerable. So this will work even if you're using anobject[]or aList<object>...That said, if you're actually using the
ArrayListclass then you might want to check out the remarks as Microsoft does not recommend that you use that class.