# HtmlSrcSetCandidate

Represents one candidate in an HTML srcset attribute.

Struct 

`OfficeIMO.Html`

**Namespace**

`OfficeIMO.Html`

**Assembly**

`OfficeIMO.Html`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[HtmlSrcSetCandidate.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Images/HtmlSrcSetCandidate.cs#L11)

**Base**

`ValueType`

**Modifiers**

sealed

Represents one candidate in an HTML srcset attribute.

## Inheritance

- ValueType
- HtmlSrcSetCandidate

## Usage

Explore 5 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 5

- Method [HtmlImageSourceResolver.ResolveFirstSrcSetCandidate](/api/html/officeimo-html-htmlimagesourceresolver/#method-resolvefirstsrcsetcandidate-string-uri-officeimo-html-htmlurlpolicy)
- Method [HtmlImageSourceResolver.ResolveSrcSetCandidates](/api/html/officeimo-html-htmlimagesourceresolver/#method-resolvesrcsetcandidates-string-uri-officeimo-html-htmlurlpolicy)
- Property [HtmlResponsiveImageSelection.Candidate](/api/html/officeimo-html-htmlresponsiveimageselection/#property-candidate)
- Method [HtmlSrcSetParser.Enumerate](/api/html/officeimo-html-htmlsrcsetparser/#method-enumerate-string)
- Method [HtmlSrcSetParser.Parse](/api/html/officeimo-html-htmlsrcsetparser/#method-parse-string)

Filter members 

Show inherited

## Constructors

`public HtmlSrcSetCandidate(string url, string descriptor)` [#](#constructor-ctor-string-string)

[HtmlSrcSetCandidate.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Images/HtmlSrcSetCandidate.cs#L11)

Creates a source-set candidate.

Parameters

**url string required**

**descriptor string required**

## Inherited Methods

`public override bool Equals(object? obj)` [#](#method-equals-object)

Inherited from ValueType

Parameters

**obj object? required**

Returns

`bool`

`public override int GetHashCode()` [#](#method-gethashcode)

Inherited from ValueType

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public override string? ToString()` [#](#method-tostring)

Inherited from ValueType

Returns

`string?`

## Properties

`public string Url { get; }` [#](#property-url)

[HtmlSrcSetCandidate.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Images/HtmlSrcSetCandidate.cs#L25)

Candidate URL before caller-specific resolution.

`public string Descriptor { get; }` [#](#property-descriptor)

[HtmlSrcSetCandidate.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Images/HtmlSrcSetCandidate.cs#L30)

Candidate descriptor, such as 2x or 640w.

`public int UrlStart { get; }` [#](#property-urlstart)

[HtmlSrcSetCandidate.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Images/HtmlSrcSetCandidate.cs#L35)

Zero-based offset of [HtmlSrcSetCandidate.Url](/api/html/officeimo-html-htmlsrcsetcandidate/) in the parsed source-set value, or -1 when the candidate was constructed directly.

<!-- PowerForge markdown artifact sha256:88DF9827D5D45213E1A1B54719BBE7F4A23D47A21B72D09311E50E428BE4DAF2 -->
