Mono.CSharp.TypeInfo.GetFieldIndex C# (CSharp) Method

GetFieldIndex() public method

public GetFieldIndex ( string name ) : int
name string
return int
		public int GetFieldIndex (string name)
		{
			if (struct_info == null)
				return 0;

			return struct_info [name];
		}

Usage Example

Example #1
0
        public bool IsStructFieldAssigned(DefiniteAssignmentBitSet vector, string field_name)
        {
            int field_idx = TypeInfo.GetFieldIndex(field_name);

            if (field_idx == 0)
            {
                return(true);
            }

            return(vector[Offset + field_idx]);
        }