Snippets Collections
using System;
using System.Collections.Generic;

public class Program
{
    public static IEnumerable<int> GetRangeWithInverse( int count ) {
        for (var i = count; i > 0; i--) {
            yield return i;
            if (i > 1) {
                yield return count - i + 1;
            }
        }
    }

    public static void Main()
    {
        Console.WriteLine(string.Join( ',', GetRangeWithInverse( 10 ) ) );
    }
}
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): error : Unable to load the service index for source https://{myaccount}.pkgs.visualstudio.com/_packaging/{myfeed}/nuget/v3/index.json.\r `[C:\Users\test\dotnet\dotnet.csproj]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): error :   Response status code does not indicate success: 401 (Unauthorized). [C:\Users\test\dotnet\dotnet.csproj]
<!DOCTYPE html>
<html>
<head>
<title>Font Awesome Icons</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>

<h1>fa fa-heart</h1>

<i class="fa fa-heart"></i>
<i class="fa fa-heart" style="font-size:24px"></i>
<i class="fa fa-heart" style="font-size:36px;"></i>
<i class="fa fa-heart" style="font-size:48px;color:red"></i>
<br>

<p>Used on a button:</p>
<button style="font-size:24px">Button <i class="fa fa-heart"></i></button>

<p>Unicode:</p>
<i style="font-size:24px" class="fa">&#xf004;</i>

</body>
</html> 
public class MyClass : INotifyPropertyChanged
{
    private string imageFullPath;

    protected void OnPropertyChanged(PropertyChangedEventArgs e)
    {
        PropertyChangedEventHandler handler = PropertyChanged;
        if (handler != null)
            handler(this, e);
    }

    protected void OnPropertyChanged(string propertyName)
    {
        OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
    }

    public string ImageFullPath
    {
        get { return imageFullPath; }
        set
        {
            if (value != imageFullPath)
            {
                imageFullPath = value;
                OnPropertyChanged("ImageFullPath");
            }
        }
    }

    public event PropertyChangedEventHandler PropertyChanged;
}
string assemblyPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
bookmark
dashboard

Thu Nov 12 2020 23:44:51 GMT+0000 (UTC) https://stackoverflow.com/questions/64813297/printing-number-with-for-loops-in-c-sharp

#cs
bookmark
dashboard

Wed Oct 07 2020 13:45:16 GMT+0000 (UTC) https://stackoverflow.com/questions/43098017/dotnet-restore-failing-when-mixing-private-nuget-feed-and-nest

#cs
bookmark
dashboard

Mon Aug 10 2020 11:03:32 GMT+0000 (UTC) https://www.w3schools.com/icons/tryit.asp?filename=tryicons_fa-heart

#html #cs #heart
bookmark
dashboard

Wed Jul 22 2020 21:22:57 GMT+0000 (UTC) https://stackoverflow.com/questions/2246777/raise-an-event-whenever-a-propertys-value-changed

#cs
bookmark
dashboard

Sun Jun 21 2020 06:50:46 GMT+0000 (UTC) https://stackoverflow.com/questions/38071639/c-sharp-get-assembly-executable-directory

#cs

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension