Set default values for CarouselData string properties
Initialized Source and AlternateText with empty strings in the CarouselData class to prevent potential null reference issues.
This commit is contained in:
@@ -31,8 +31,8 @@
|
||||
|
||||
public class CarouselData
|
||||
{
|
||||
public string Source { get; set; }
|
||||
public string AlternateText { get; set; }
|
||||
public string Source { get; set; } = string.Empty;
|
||||
public string AlternateText { get; set; } = string.Empty;
|
||||
|
||||
public CarouselData(string source, string alt)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user