This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace GenericDelegate; | |
| using System; | |
| class Program | |
| { | |
| public static Boolean Notify(String str) | |
| { | |
| double num; | |
| bool isNum = Double.TryParse(Convert.ToString(str), out num); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace GenericInterface | |
| { | |
| public interface IListInterface<T> | |
| { | |
| public void Add(T item); | |
| public void Remove(T item); | |
| public IEnumerable<T> GetValues(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| class GenericClass<T> | |
| { | |
| private T value; | |
| public GenericClass(T value) | |
| { | |
| this.value = value; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Program | |
| { | |
| public static void Main(string[] args) | |
| { | |
| int[] intArray = { 1, 2, 3, 4, 5 }; | |
| double[] doubleArray = { 1.1, 2.2, 3.3, 4.4 }; | |
| Console.WriteLine("Array intArray contains:"); | |
| DisplayArray(intArray); // pass an int array argument | |
| Console.WriteLine("\nArray doubleArray contains:"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| public class SocialAccounts | |
| { | |
| public string ytId,twId,instaId; | |
| public SocialAccounts(string fid, string tid, | |
| string insid) | |
| { | |
| ytId=fid; | |
| twId=tid; | |
| instaId=insid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| class LocationProperties | |
| { | |
| public int population; | |
| public float area; | |
| public void setLocprops(int p,float a) | |
| { | |
| population=p; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| class Program { | |
| public interface ISocialPageInfo{ | |
| public void getCount(int l, int dl); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| abstract class Login | |
| { | |
| public string UserName,Password; | |
| public void getCredentials(string PlatformName) | |
| { | |
| Console.WriteLine($"Enter {PlatformName} UserName"); | |
| UserName = Console.ReadLine(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| delegate void MulticastSample(string s); | |
| class Program { | |
| static void MailNotification(string x) | |
| { | |
| Console.WriteLine($"Email about {x}\n"); | |
| } | |
| static void MessageNotification(string y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace EventsDelegates | |
| { | |
| public class Subscriber | |
| { | |
| public void GetNotified(object S, VideoDetailEventArgs e) | |
| { | |
| Console.WriteLine(e.VideoTitle+" "+"uploaded"); | |
| } | |
| } |
NewerOlder