# Dteremine the type of fields in a struct

**URL:** https://discourse.julialang.org/t/dteremine-the-type-of-fields-in-a-struct/36563
**Category:** General Usage
**Created:** [March 26, 2020, 6:31pm UTC](https://discourse.julialang.org/t/dteremine-the-type-of-fields-in-a-struct/36563 "2020-03-26T18:31:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ferran\_Mazzanti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ferran_mazzanti/32/7458_2.png) [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)
#### Post date: [March 26, 2020, 6:31pm UTC](https://discourse.julialang.org/t/dteremine-the-type-of-fields-in-a-struct/36563/1 "2020-03-26T18:31:00Z")

</div>

Hi,  
is it possible to know the types of each field in an instance of a struct?  
Assume I have been given a code that I can’t see, but that includes a struct like this

```julia
mutable struct kroko{T} where T
  x :: Int32;
  y :: Float64;
  z :: T;
  kroko{T}() where {T} = new()
end

```

and I’m told such a struct exists, that I can initialize as

```julia
croc = kroko{Float64}()

```

As you see, fields are undefined but their types are well defined.  
Now is there a way to get the types of the different fields of croc() ?  
Or maybe it does not make sense as it is?

Best regards and thanks,

Ferran.

---

<div class="post-metadata">

### Author: ![Ferran\_Mazzanti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ferran_mazzanti/32/7458_2.png) [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)
#### Post date: [March 26, 2020, 6:36pm UTC](https://discourse.julialang.org/t/dteremine-the-type-of-fields-in-a-struct/36563/2 "2020-03-26T18:36:43Z")

</div>

Never mind, I’be just found it 🙂
