Tags » Codes

Gem Codes: July 13 - July 20

Facebook Code:
FE41-3BA9-CA7C-F2D4
(Expires July 20, 2020)

Gems

Cryptoquote Spoiler - 07/13/20

“There is a kind of magicness about going far away and then coming back all changed.”   —   Kate Douglas Wiggin

(She wrote children’s books, like “Rebecca of Sunnybrook Farm”.  62 more words

Entertainment

The First Ten Letters of the Alphabet

The first ten letters of the alphabet (ABCDEFGHIJ) can form a cipher that represents the name of a number that is less than one hundred. What is this number? 116 more words

Puzzle

The 13th Clue

The 13th Clue by Ann Jonas, 1988.

This picture book is almost entirely pictures. The pictures present clues to a treasure hunt and reveal the true story of the book. 401 more words

Children

Sunday Cryptoquote Spoiler - 07/12/20

“The man who does not read good books has no advantage over the man who can’t read them.”   —   Mark Twain

(Whenever my wife sees just about any book, she says:  … 65 more words

Entertainment

Properties In C#

create a Student.cs class and write below codes:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Properties_In_CSharp
{
    public class Student
    {
        //make our field to private
        private int _studentID;
        private string _name;
        private int _passingMarks = 33;
        public  string City { get; set; }   //auto implemented properties intruduce in C#3.0 if there is no logic use this. 321 more words
C#

Why We Use Properties

create Student.cs class and write below codes:

using System;

namespace Why_Properties
{
    public class Student
    {
        //make our field to private
        private int _studentID;
        private string _name;
        private readonly int _passingMarks = 33;


        //set getter and setter for all fields

        //for student id 
        public void SetStudentID(int Id)
        {
            if (Id <= 0)
                Console.WriteLine("0 or negative value not allowed");
            else
            {
                this._studentID = Id;
            }
        }

        public int GetStudentId()
        {
            return this._studentID;
        }

        //for Name
        public void SetName(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                Console.WriteLine("Null or Empty Name not allowed");    //we can use throw except instead of this msg. 246 more words
C#