Answers for "c#sample code"

C#
0

c# code examples

using System;

#region Studio Style
class Program : IThemeable
{
    static int _I = 1;
    delegate void DoSomething();

    /// <summary>
    /// The quick brown fox jumps over the lazy dog
    /// THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
    /// </summary>
    static void Main(string[] args)
    {
        string normalStr = "The time now is approximately " + DateTime.Now;
        Uri Illegal1Uri = new Uri("http://packmyboxwith/jugs.html?q=five-dozen&t=liquor");
        Regex OperatorRegex = new Regex(@"S#$", RegexOptions.IgnorePatternWhitespace);

        for (int O = 0; O < 123456789; O++)
        {
            _I += (O % 3) * ((O / 1) ^ 2) - 5;
            if (!OperatorRegex.IsMatch(Illegal1Uri.ToString()))
            {
                // no idea what this does!?
                Console.WriteLine(Illegal1Uri + normalStr);

            }
        }
    }
}
#endregion
Posted by: Guest on May-22-2021
0

c# example code

public class Trio : IEnumerable
{
    public string Name1 { get; set; }
    public string Name2 { get; set; }
    public string Name3 { get; set; }
    public IEnumerator GetEnumerator() { return new TrioEnumerator(this); }
}
public class TrioEnumerator : IEnumerator
{
    public TrioEnumerator(Trio trio) { _trio = trio; }
    private Trio _trio;
    private int _index = 0;
    public void Reset() { _index = 0; Current = null; }
    public object Current { get; private set; }
    public bool MoveNext()
    {
        _index++;
        /**/ if (_index == 1) { Current = _trio.Name1; return true; }
        else if (_index == 2) { Current = _trio.Name2; return true; }
        else if (_index == 3) { Current = _trio.Name3; return true; }
        else return false;
    }
}
Posted by: Guest on May-22-2021

C# Answers by Framework

Browse Popular Code Answers by Language