Reflection in c#

April 29th, 2008

Reflection is a process by which an application can read and collect data from assemby and metadata.

Reflection.cs
===
using System;
using System.Reflection;
class zzz
{
public static void Main()
{
Type m;
m = typeof(int);
System.Console.WriteLine(m.Name + ” ” + m.FullName);
m = typeof(System.Int32);
System.Console.WriteLine(m.Name + ” ” + m.FullName);
m = typeof(yyy);
System.Console.WriteLine(m.Name + ” ” + m.FullName);
m=typeof(string);
MemberInfo [] n;
n = m.GetMembers();
Console.WriteLine(n.Length);
foreach ( MemberInfo a in n)
{
Console.Write(a.Name+”,”);
}
System.Console.WriteLine(m.Name + ” ” + m.FullName);
}
}
class yyy
{
}
===

Read from Web using C#

April 22nd, 2008

Here again we will use System.Net and the classes we shall use in the c# code from the .NET framework are WebRequest and WebResponse. WebRequest and WebResponse classes from the .NET Library are used to to request web-pages from the internet.

Readnet.cs
===
using System;
using System.Net;
using System.IO;
class zzz
{
public static void Main()
{
WebRequest r = WebRequest.Create(”http://www.jimmysvalueworld.com”);
WebResponse re = r.GetResponse();
Stream s = re.GetResponseStream();
Byte[] a = new Byte[51200];
int b = s.Read(a, 0, 51200);
Console.WriteLine(b);
Console.Write(System.Text.Encoding.ASCII.GetString(a, 0, b));
}
}
===

Sales Intimidator

March 31st, 2008

“Use This Incredible New Script To Actually Force Your Website Visitors To Purchase Your Products, Spend More Cash, And Keep Coming Back For More and More…”

-> Smart Internet E-Marketers All Over the WWW have Already Discovered How Sales Intimidator Sends More Visitors Scrambling For Their Credit Cards As Fast And As OFTEN As They Possibly Can…

Let’s get to the point….

To make more money from your web-site, you gotto increase the traffic plus increase conversions on the traffic you are already getting. You need your sales promo page to sell more copies plus you need your visitors to spend more money.

What it does :

1. First Hit : Only XX copies remain - Showing your website visitor the number of copies remaining does two things for you… First of all the falling number Creates a sense of urgency for your prospect, and as the lower it goes, the more it works in your favour.

2. Strike two : The SECOND BLOW is that the user cannot leave the page, come back later and still get your reduced price!
When the user refreshes the sales page, or leaves and comes back later, they will automatically be redirected to your “page 2 offer”. This page will have another offer for your visitor, only at a higher price.

Another reat advantage is it provides what is known as “social proof” that other people are buying this product too - “so it must be great!” We humans are instinctive creatures, and when we see others doing something, we have more confidence in our decision to do it too.

3. Knockout : Time based - Order in The Next XX Minutes and get ….

This is no ploy. Now when you give your visitors a countdown, YOU REALLY MEAN IT!

With Sales Intimidator you get :

  • Your Own Copy of Sales Intimidator!
  • Unlimited Domain Licence!
  • Full UNRESTRICTED Private Label Rights to Sales Intimidator, to use ANY way you wish!
  • Copy of This Salespage!
  • Graphics and .PSD Files for Easy Editing!
  • Unencrypted Sourcecode and Full Sourcecode Rights to Add, Subtract, or Edit ANY Way You Want!

    Get the incredible Sales Intimidator Php script for $9.95 ONLY

  • Popular web scripts

    February 10th, 2008

    Run your own Youtube site or popular social bookmarking site like Myspace and make money through advertising or adsense.

    Nowadays Web 2.0 sites are the most popular ones and have the most number of visitors. Some of them include Youtube, Social sites like Myspace and Orkut.com

    You can now run such sites easily with Website clones script package.

    Website clones of Youtube, myspace, shorter Url script and more

    The scripts that are a part of this package include :

  • Clone of Myspace.com.
  • Clone of YouTube.com.
  • Run Imaging site like Image Shack.com.
  • Hotscripts.com clone.
  • File Sharing website site like Rapidshare.de.
  • Adultcheck clone - Age verification system.
  • Script like site WhatIsMyIP.com.
  • A clone of xdrive.com to backup files.
  • Clone of Yahoo GEOCITIES.
  • Shorter URL script like TinyUrl.com
  • and also clones of Anonym.to, ImageShack.com, Freedomain.co.nr and SaveFile.com

    Buy Website clones script for $9.95 Only

  • Membership management script

    January 27th, 2008

    Membership management script - Membership Juggernaut

    Membership sites are the sites of the future. This incredible script will make your whole management process a breeze.

    It is a fact that 90% of Internet marketing gurus or Internet marketing advisors make it big for them with the use of such membership sites.

    With such a cool thing you can :

  • Run your own subscription site. Create members and a huge mailing list.
  • Recruit and keep track of your affiliates
  • Make recurring income from your site by charging a periodical fee.
  • Automatically manage your subscription account.
  • Show your credibility to your members through proper use of such a membership site.
  • Increase your reputation among site owners and members.
  • Increase your Joint Ventures.

    What is so good about this particular script is that it make everything professional and easy for you.

    The features of this script are :

  • Accept one time payment via PayPal or accept recurring subscription fees using Paypal.
  • View/Add/Modify or Delete your members profile using your Admin Control Panel.
  • Easily keep track of affiliate-stats.
  • Entire process of sending e-mail notification to your members either when they join or cancel their membership.
  • E-mail your members right from your Admin panel - It can be any information - Adding new product, make an announcement/news or any special messge just for your members.
  • No scripting or programming knowledge needed - Easily edit your Member’s main pages, Admin pages or login pages.
  • And so much more…


    Click here to buy this incredible Membership management script for $9.95 Only

  • Download site creator script

    January 17th, 2008

    Download site creator script

    About Download site creator script : The incredible script will help you run a download-gallery in your site where you can properly categorize all of your e-products.

    Features of Download site creator script :

  • Is easily customizable including headers and footers
  • Easily create categories and downloads.
  • Is user-friendly and very easy to use.
  • Add/Edit and Delete downloads fast.
  • The ‘Add Download form’ does not add unnecessary details to fill up, like many other download scripts do.
  • Download page will appear cleaner and professional to your members which means good reputation for your site.
  • Let your members, users located links to your products easily and faster hence saving them from frustration.
  • No need to upload Html file or the tension of having a large download page.
  • You wont need to manually edit any code or H.T.M.L

    Screenshot of Download site creator script

    Get Download site creator for $9.95 Only

  • We wish you a Happy new year

    January 1st, 2008

    The team at Fullycoded.com wishes you a very happy and prosperous new year :)

    We promise to deliver you better website scripts and vb source code this year.

    Regards,
    ASHISH H THAKKAR and the People at Fullycoded.com

    Read a file in C#

    November 2nd, 2007

    Read0.cs
    ===
    using System;
    using System.IO;
    namespace ns{
    class zzz
    {
    public static void Main()
    {
    FileStream f = new FileStream(”c:\\c\\pointers.cs”, FileMode.Open, FileAccess.Read);
    byte [] a;
    a = new byte[512];
    int b = f.Read(a, 0, 512);
    Console.WriteLine(b);
    string s = System.Text.Encoding.ASCII.GetString(a, 0, b);
    Console.Write(s);
    }
    }
    }
    ==

    Read.cs
    ===
    using System.IO;
    class read{
    public static void Main()
    {
    File a=new File(”C:\\jimmy\\Comp\\Microsoft\\C#\\C#.txt”);
    Stream sr=a.OpenRead();
    int fp;
    do{
    fp=sr.ReadByte();
    if(fp != -1)
    System.Console.WriteLine(fp.ToString());
    }
    while( fp != -1);
    sr.Close();
    }
    }
    ==

    Joint Venture Firesale Automator

    September 29th, 2007

    With Joint Venture Firesale Automator you can run joint ventures easily because now you have the right tool that will help you manage the entire process easily all by yourself.

    Whether Your JV Involves Selling Time Limited based Products, One Time Offers, FireSales or Just simple Signups You can just automate your entire Joint Venture easily with Joint Venture FireSale Automator !

    Joint venture firesale automatorAdvantages of JV Firesale automator :

  • Completely template based so you do not have to do any coding.
  • Edit sales letter templates to suit yourself.
  • Fully automate JV start/end dates.
  • Saves you money coz you will not have to buy any expensive softwares or other joint venture software for this - You can automatically display order buttons or signup forms.
  • No upload download issues as everything is done though admin area. Automation of prices - Changes prices at midnight (if opted) and updates the paypal/stormpay button plus updates firsale prices on your sales page.
  • Track referrals and and reward joint venture partners automatically.
  • Manage teaser pages easily.
  • Automatically the member’s area will display contest details according to contest timings.
  • Automate email communication
  • No cheating allowed. Fully IPN supported - for paypal and stormpay.
  • Be more personal - Personalize each and every member plus Jv partner.
  • Automation of payment of commision to Jv partners.
  • Joint Venture Firsale automator is very easy to install.


    Get the Joint venture firesale automator script for $9.95 Only

  • Peel Away and Page peel ads.

    July 8th, 2007

    Javascript popup and popup maker ads are too common to see nowadays.

    You can now attract your visitors with new type of ads made in javascript which are called the Peel Away | Page peel ads. These ads show in the top right corner of your screen. See below for image :

    Page peel ad image
    Before Image

    Below is what you will see when your website visitor clicks or takes his mouse on the page peel area :

    Peel away ads
    After Image

    Features include :

  • It is one of the best methods to get the attention without the complaints of your website visitors.
  • When your Site visitor moves his mouse over the Peel-Away Ad it smoothly opens with a peel off animation ad shown in the image above (”After image”).
  • Advertising boon - You can rotate multiple Ads with this incredible script.
  • Use on as many sites as you like because the setup is a piece of cake.
  • Includes templates inside.
  • Learn using the step by step installation video inside.
  • Download the Page Peel | Peel away ads script for $19.95 ONLY

    OR

    Buy multiple website license to Page peel away ads for $39.95 ONLY

    Helpdesk script

    May 11th, 2007

    Why do you need helpdesk/support on your website

    What will you loose if you dont have helpdesk available

    The fact that Internet marketing gurus have support desks on their sites should be a good enough reason for you to have one too.

    Support desk admin

  • Having a support system on your site can make you look more professional.
  • Problems of emails : With support desk 90% of your questions are answered automatically and the rest can be taken care by you. With the problems of spam blockers there are chances that your support email might not even go through. So this is one more reason why you need to give online support through your website.
  • Your repeat customers will increase : It’s a known fact that it is easier to sell to a satisfied customer than to acquire a new one.
  • Saves time : How many times do you have to copy paste or type in the whole answer again. Why not just provide it once in your support desk ?

    Helpdesk / Support desk user

    On your site a user can:

  • Submit a support ticket. Can also specify a department, ticket priority and the subject of the ticket.
  • Check the status of his ticket. What the last reply was on the ticket, whether the ticket is closed etc
  • Reopen or close ticket according to the user’s choice.
  • Browse through the Knowledgebase added by Admin or Operator.
  • View the Troubleshooters added by Admin/Operator.
  • Download files put up by Admin in the downloads folder.
  • Check the news and announcements added by Admin.
  • Popular Knowledgebase Topics gives users quick access to the most popular views and issues in Knowledgebase.

    Note : Unanswered questions from potential customers and delays in dealing with your buyer’s problems could cause your business losses in the long run.

    Get this incredible Helpdesk / support script for $9.95 Only

  • SEO Niche sites creator script

    March 11th, 2007

    Site creator box

    Create a site With Content - Articles, Humour, Gaming, Pictures, Audio Clips, Video Clips And much More…
    With Just A Few Simple Clicks!

    If you want repeat visitors to your site then this is the script for you.

    VIP Interactive Site Creator allows you to create ,manage and edit interactive SEO Niche sites where you can have tips, articles, jokes, images, audio/video content and games.

    The benefits of this script are :

  • Manage everything from the admin panel itself : Entire content, templates, ratings given/comments written, registered users and just about everything.
  • Add, edit and manage all content in categories/sub categories.
  • Users can not only give a rating to the content but can also add their valuable comments.
  • No need for external video players: Users can see videos using video section and can hear the audio files in the audio section.
  • Users can add/submit links (this requires admin approval first).
  • Create an e-newsletter for site visitors and gain subscribers to build your list.
  • Select the look of your site from the available themes.
    Vip site creator template image

  • Picture section displays picture’s details such as category, rating, and views. Clicking on a picture displays other details such as author, size of the file plus its description.
  • Administrator can add any types of games in the games section.
  • Add Google Adsense code or any other advertising code inside the admin panel. Ads will be displayed on all pages in header and footer areas.
  • Add, edit and manage users, user-credits from admin.
  • Add/edit/manage content like the newsletter, advertisements and user comments.
  • Search facility : Users can search for pics, audio/videos, games, jokes, e-newsletters etc.
    Interactive site creator index page
  • Pages will have static links. Which means they will be search engine friendly.
  • Generate Reports, and Add, edit and manage the meta-tags of any of your website pages.
  • Get this incredible site creator script for $9.95 ONLY with resell rights

    C# source code : Print page

    January 21st, 2007

    Print.cs
    using System;
    using System.Windows.Forms;
    using System.Drawing;
    using System.Drawing.Printing;
    using System.IO;
    public class zzz
    {
    public void abc()
    {
    PrintDocument pd = new PrintDocument();
    pd.PrintPage += new PrintPageEventHandler(pqr);
    pd.Print();
    }
    void pqr(object o, PrintPageEventArgs e)
    {
    Image i = Image.FromFile(”code.jpg”);
    Point p = new Point(100, 100);
    e.Graphics.DrawImage(i, p);
    e.Graphics.DrawString (”C sharp source code”, new Font(”Courier New”,10), Brushes.Black, 100, 600);
    }
    public static void Main()
    {
    zzz a = new zzz();
    a.abc();
    }
    }

    Pointers in C#

    December 10th, 2006

    Pointer.cs

    using System;
    class un{
    public static void Main()
    {
    un1 o=new un1();
    o.meth();
    }
    }
    class un1
    {
    unsafe public void meth()
    {
    int *i;
    int j=103;
    i=&j;
    Console.WriteLine((int)i);
    Console.WriteLine(j);
    }}

    Pointer1.cs

    using System;
    class zzz
    {
    public static void Main()
    {
    yyy a = new yyy();
    a.abc();
    }}
    class yyy
    {
    unsafe public void abc()
    {
    int *i;
    int j=1, k = 1;
    //An & in front of any variable tells us where it starts in memory
    i = &j;
    //pointing to j
    Console.WriteLine((int)i);
    *i = 10;
    //changing value of j thru this
    Console.WriteLine(j);
    i = &k;
    Console.WriteLine((int)i);
    *i = 100;
    Console.WriteLine(k + ” ” + j);
    }}

    Override in C#

    November 25th, 2006

    Override.cs

    class zzz
    {
    public static void Main()
    {
    yyy a = new yyy();xxx b = new xxx();yyy c = new xxx();
    a.abc();a.pqr();a.xyz();
    b.abc();b.pqr();b.xyz();
    c.abc();c.pqr();c.xyz();
    }}
    class yyy
    {
    public virtual void abc()
    { System.Console.WriteLine(”1″); }
    public virtual void pqr()
    { System.Console.WriteLine(”2″); }
    public virtual void xyz()
    { System.Console.WriteLine(”3″); }
    }
    class xxx : yyy
    {
    public override void abc()
    { System.Console.WriteLine(”4″); }
    public new void pqr()
    { System.Console.WriteLine(”5″); }
    public void xyz()
    { System.Console.WriteLine(”6″); }
    }

    out and ref in c#

    October 25th, 2006

    out.cs

    class zzz
    {
    public static void Main()
    {
    yyy a;
    int i;
    a=new yyy();
    a.abc(out i);
    System.Console.WriteLine(i);
    }
    }
    class yyy {
    public void abc( out int i) {
    i=10;
    }
    }
    //bcoz of out 10 else 100
    //out makes available the changes outside class

    ref.cs

    class zzz
    {
    public static void Main()
    {
    yyy a;
    int i=100;//have to initialize in ref
    a=new yyy();
    a.abc(ref i);
    System.Console.WriteLine(i);
    }
    }
    class yyy
    {
    public void abc( ref int i)
    {
    i=10;
    }
    }

    Object data type in C#

    September 27th, 2006

    Object.cs

    using System;
    class Test
    {
    static void Main() {
    string s = “Test”;
    string t = string.Copy(s);
    Console.WriteLine(s == t);
    Console.WriteLine((object)s == (object)t);
    }
    }

    ObjectDataType.cs

    class Point
    {
    public int x, y;
    public Point(int x, int y) {
    this.x = x;
    this.y = y;
    }
    }
    class Test
    {
    static void Main() {
    Point[] points = new Point[100];
    for (int i = 0; i < 100; i++)
    {
    points[i] = new Point(i, i*i);
    System.Console.WriteLine("{0}",points[i]);
    }
    }
    }

    Nested classes in C#

    September 6th, 2006

    A sample code for nested classes in C#.NET

    nested.cs

    public class zzz
    {
    public static void Main()
    {
    yyy.xxx a = new yyy.xxx();
    a.ni();
    }
    }
    public class yyy
    {
    public xxx abc()
    {
    return new xxx();
    }
    public class xxx
    {
    public void ni(){
    System.Console.WriteLine(”HERE”);
    }
    }
    }

    Namespace in C#

    August 9th, 2006

    C# code : Look how in class1.cs the abc function is being called from class2.cs.

    class1.cs

    using newy;
    class class1 : class2
    {
    public static void Main()
    {
    abc();
    }
    }

    class2.cs

    using System;
    namespace newy{
    public class class2{
    static void Main()
    {
    abc();
    }
    public static void abc()
    {
    string a=System.Console.ReadLine();
    System.Console.Write(a);
    }}
    }

    oneinallnamespace.cs (Example)

    class zzz
    {
    static void Main()
    {
    vijay.yyy.abc();
    abc();
    zzz.abc();
    }
    public static void abc()
    {
    System.Console.WriteLine(”abc in zzz “);
    }
    }
    namespace vijay
    {
    class yyy
    {
    public static void abc()
    {
    System.Console.WriteLine(”abc”);
    }}
    }

    using System.Diagnostics

    July 25th, 2006

    checkdll.css.

    using System;
    using System.Diagnostics;
    using System.IO;

    namespace FrameworkExamples
    {
    //HOW TO Get information about the modules being referenced
    // by a running process with the DOT NET Framework

    class SampleProcessModules
    {
    static void Main()
    {
    Process[] p;

    //get the current process
    //p = Process.GetCurrentProcess(”iexplore.exe”);
    p=Process.GetProcessesByName(”Iexplore”);

    //get all the dlls this class is using
    foreach(ProcessModule module in p.Modules)
    {
    //dll name
    Print(module.ModuleName, 20);

    //full path
    Print(module.FileName, 75);

    //dll version
    Print(module.FileVersionInfo.FileVersion, 20);

    //last write time
    Print(File.GetLastWriteTime(module.FileName).ToShortDateString(), 20);

    Console.WriteLine();
    }

    //cleanup
    p.Close();
    p = null;
    }

    //utility function for writing to the console
    static void Print(string towrite, int maxlen)
    {
    if (towrite.Length >= maxlen)
    {
    Console.Write(towrite.Substring(0, maxlen - 4)+”… “);
    return;
    }
    towrite += new string(’ ‘, maxlen - towrite.Length);

    Console.Write(towrite);
    }
    }
    }