Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. 2 C# question

2 C# question

Scheduled Pinned Locked Moved C#
questioncsharphelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    E_Gold
    wrote on last edited by
    #1

    Hi evryone I have some C# question 1. how to make event and use him ? 2. how to transfer file from computer1 to computer2 (in LAN - in share folder) I try whit File.Copy, but it isent work thank's for any help

    D M 2 Replies Last reply
    0
    • E E_Gold

      Hi evryone I have some C# question 1. how to make event and use him ? 2. how to transfer file from computer1 to computer2 (in LAN - in share folder) I try whit File.Copy, but it isent work thank's for any help

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      1. There are many great articles around on CodeProject and elsewhere. A search here and on google should yeild many results. I also have an article here[^] aimed at beginners to events. 2. .NET applications without some work cannot access network shares etc with good reason. You can do it using impersonation (and spplying valid credentials of a user that has permissions to access the share) or physically altering the .NET runtime security policy on each machine that requires it.

      Dave
      BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
      Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

      1 Reply Last reply
      0
      • E E_Gold

        Hi evryone I have some C# question 1. how to make event and use him ? 2. how to transfer file from computer1 to computer2 (in LAN - in share folder) I try whit File.Copy, but it isent work thank's for any help

        M Offline
        M Offline
        Maxim Langman
        wrote on last edited by
        #3

        1. In order to create an event in your call you should do declare two things: a. Declare public delegate b. Declare public event which is an instance of this delegate

        public delegate void ClickHandler(int Param1, int Param2);
        public event ClickHandler Click;

        Then when you want to fire this event you just call it:

        private void foo(){
        ...
        ...
        Click(argument1, argument2);
        ...
        }

        2. File.Copy should work if you map the drive

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups